@@ -266,157 +266,7 @@ export function App() {
266266}
267267
268268let initialTreeRaw = {
269- nodes : [
270- // Root 1: Quantum Flux Capacitor Systems
271- {
272- id : "quantum-flux-capacitor" ,
273- title : "Quantum Flux Capacitor" ,
274- description :
275- "Primary temporal displacement mechanism utilizing quantum entanglement principles for chronodynamic stabilization" ,
276- dependsOn : [ ] ,
277- } ,
278- {
279- id : "temporal-phase-discriminator" ,
280- title : "Temporal Phase Discriminator" ,
281- description :
282- "Advanced chronometric filtering system that isolates temporal anomalies through phase-locked loop mechanisms" ,
283- dependsOn : [ "quantum-flux-capacitor" ] ,
284- } ,
285- {
286- id : "chronodynamic-stabilizer" ,
287- title : "Chronodynamic Stabilizer" ,
288- description :
289- "Maintains temporal coherence by modulating quantum decoherence rates via parametric amplification" ,
290- dependsOn : [
291- "temporal-phase-discriminator" ,
292- "quantum-entanglement-matrix" ,
293- ] ,
294- } ,
295- {
296- id : "temporal-feedback-suppressor" ,
297- title : "Temporal Feedback Suppressor" ,
298- description :
299- "Prevents causality loop formation through predictive temporal echo cancellation algorithms" ,
300- dependsOn : [ "chronodynamic-stabilizer" ] ,
301- } ,
302- {
303- id : "quantum-resonance-chamber" ,
304- title : "Quantum Resonance Chamber" ,
305- description :
306- "Amplifies quantum field oscillations using standing wave interference patterns in hyperdimensional space" ,
307- dependsOn : [ "quantum-flux-capacitor" ] ,
308- } ,
309- {
310- id : "temporal-displacement-array" ,
311- title : "Temporal Displacement Array" ,
312- description :
313- "Multi-dimensional projection system enabling controlled temporal trajectory modifications" ,
314- dependsOn : [ "temporal-feedback-suppressor" , "quantum-resonance-chamber" ] ,
315- } ,
316-
317- // Root 2: Turbo Encabulator Matrix
318- {
319- id : "turbo-encabulator" ,
320- title : "Turbo Encabulator" ,
321- description :
322- "The original automated cardinal grammeters for effectively preventing side fumbling in mechanical systems" ,
323- dependsOn : [ ] ,
324- } ,
325- {
326- id : "panendermic-semiboloid" ,
327- title : "Panendermic Semiboloid" ,
328- description :
329- "Essential slots for the winding of the rotor, configured in a panendermic arrangement for optimal sinusoidal depleneration" ,
330- dependsOn : [ "turbo-encabulator" ] ,
331- } ,
332- {
333- id : "ambifacient-lunar-waneshaft" ,
334- title : "Ambifacient Lunar Waneshaft" ,
335- description :
336- "Couples directly to the differential girdlespring on the up-end of the grammeters for maximum torque transmission" ,
337- dependsOn : [ "panendermic-semiboloid" , "quantum-entanglement-matrix" ] ,
338- } ,
339- {
340- id : "malleable-logarithmic-casing" ,
341- title : "Malleable Logarithmic Casing" ,
342- description :
343- "Houses the cardinal grammeters in a logarithmic spiral configuration to prevent exponential decay of the flux coefficients" ,
344- dependsOn : [ "turbo-encabulator" ] ,
345- } ,
346- {
347- id : "spurving-bearings" ,
348- title : "Spurving Bearings" ,
349- description :
350- "Specialized bearing assemblies that maintain proper alignment of the panendermic semiboloid slots during high-speed operation" ,
351- dependsOn : [
352- "ambifacient-lunar-waneshaft" ,
353- "malleable-logarithmic-casing" ,
354- ] ,
355- } ,
356- {
357- id : "differential-girdlespring" ,
358- title : "Differential Girdlespring" ,
359- description :
360- "Provides reactive torque compensation and prevents side fumbling through advanced spring-loaded differential mechanisms" ,
361- dependsOn : [ "spurving-bearings" ] ,
362- } ,
363-
364- // Root 3: Hyperbolic Metamagnetic Engine
365- {
366- id : "hyperbolic-metamagnetic-engine" ,
367- title : "Hyperbolic Metamagnetic Engine" ,
368- description :
369- "Revolutionary propulsion system utilizing metamagnetic field inversion for hyperbolic trajectory optimization" ,
370- dependsOn : [ ] ,
371- } ,
372- {
373- id : "metamagnetic-field-inverter" ,
374- title : "Metamagnetic Field Inverter" ,
375- description :
376- "Reverses polarity of metamagnetic domains through controlled ferromagnetic hysteresis manipulation" ,
377- dependsOn : [ "hyperbolic-metamagnetic-engine" ] ,
378- } ,
379- {
380- id : "hyperbolic-trajectory-calculator" ,
381- title : "Hyperbolic Trajectory Calculator" ,
382- description :
383- "Computes optimal flight paths using non-Euclidean geometry and metamagnetic field strength calculations" ,
384- dependsOn : [ "metamagnetic-field-inverter" , "quantum-entanglement-matrix" ] ,
385- } ,
386- {
387- id : "ferromagnetic-oscillation-dampener" ,
388- title : "Ferromagnetic Oscillation Dampener" ,
389- description :
390- "Suppresses unwanted magnetic harmonics through parametric feedback control of ferromagnetic domains" ,
391- dependsOn : [ "hyperbolic-metamagnetic-engine" ] ,
392- } ,
393- {
394- id : "metamagnetic-flux-regulator" ,
395- title : "Metamagnetic Flux Regulator" ,
396- description :
397- "Maintains constant metamagnetic field density through adaptive flux compensation algorithms" ,
398- dependsOn : [
399- "ferromagnetic-oscillation-dampener" ,
400- "hyperbolic-trajectory-calculator" ,
401- ] ,
402- } ,
403- {
404- id : "hyperbolic-propulsion-array" ,
405- title : "Hyperbolic Propulsion Array" ,
406- description :
407- "Multi-vector thrust generation system utilizing synchronized metamagnetic field manipulation for omnidirectional acceleration" ,
408- dependsOn : [ "metamagnetic-flux-regulator" ] ,
409- } ,
410-
411- // Shared dependency node
412- {
413- id : "quantum-entanglement-matrix" ,
414- title : "Quantum Entanglement Matrix" ,
415- description :
416- "Fundamental quantum substrate enabling instantaneous information transfer across space-time via entangled particle pairs" ,
417- dependsOn : [ ] ,
418- } ,
419- ] ,
269+ nodes : [ ] ,
420270} ;
421271let initialTree = validate ( initialTreeRaw ) ;
422272let initialTreeHistory = [ initialTree ] ;
@@ -454,33 +304,32 @@ function LoadedApp() {
454304 let fileInputRef = useRef < HTMLInputElement > ( null ) ;
455305 let [ isLoadingUrl , setIsLoadingUrl ] = useState ( false ) ;
456306
457- // Check for URL parameter on mount
307+ // Load the default tree
458308 useEffect ( ( ) => {
459- const urlParam = getUrlParameter ( "url" ) ;
460- if ( urlParam ) {
461- setIsLoadingUrl ( true ) ;
462- fetchTreeFromUrl ( urlParam )
463- . then ( ( validatedTree ) => {
464- // Successfully loaded and validated - add to history
465- setTreeHistory ( [ validatedTree ] ) ;
466- setTreeIndex ( 0 ) ;
467-
468- // Reset UI state
469- setRootNodeId ( null ) ;
470- setSelectedNodeId ( null ) ;
471- setError ( null ) ;
472- } )
473- . catch ( ( err ) => {
474- console . error ( "Error loading from URL:" , err ) ;
475- setError (
476- err instanceof Error ? err . message : "Failed to load from URL" ,
477- ) ;
478- } )
479- . finally ( ( ) => {
480- setIsLoadingUrl ( false ) ;
481- } ) ;
482- }
483- } , [ ] ) ; // Empty dependency array - only run on mount
309+ const urlParam = getUrlParameter ( "url" ) || "./trees/default.json" ;
310+
311+ setIsLoadingUrl ( true ) ;
312+ fetchTreeFromUrl ( urlParam )
313+ . then ( ( validatedTree ) => {
314+ // Successfully loaded and validated - add to history
315+ setTreeHistory ( [ validatedTree ] ) ;
316+ setTreeIndex ( 0 ) ;
317+
318+ // Reset UI state
319+ setRootNodeId ( null ) ;
320+ setSelectedNodeId ( null ) ;
321+ setError ( null ) ;
322+ } )
323+ . catch ( ( err ) => {
324+ console . error ( "Error loading from URL:" , err ) ;
325+ setError (
326+ err instanceof Error ? err . message : "Failed to load from URL" ,
327+ ) ;
328+ } )
329+ . finally ( ( ) => {
330+ setIsLoadingUrl ( false ) ;
331+ } ) ;
332+ } , [ ] ) ;
484333
485334 const subtree = useMemo ( ( ) => {
486335 if ( rootNodeId === null ) {
@@ -725,7 +574,14 @@ function LoadedApp() {
725574 < div className = "bg-white shadow-sm border-b p-4 flex items-center justify-between" >
726575 < div className = "flex items-center gap-2" >
727576 < img src = "./favicon.svg" alt = "Tech Tree" className = "w-6 h-6" />
728- < h1 className = "text-xl font-semibold" > Tech Tree</ h1 >
577+ < a
578+ href = "https://github.com/eqrion/tech-tree"
579+ target = "_blank"
580+ rel = "noopener noreferrer"
581+ className = "text-xl font-semibold text-gray-900 hover:text-blue-900 transition-colors hover:underline"
582+ >
583+ Tech Tree
584+ </ a >
729585 { isLoadingUrl && (
730586 < div className = "ml-4 flex items-center gap-2 text-sm text-blue-600" >
731587 < div className = "animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600" > </ div >
0 commit comments