|
| 1 | +# Graph Semantic Map Redesign |
| 2 | + |
| 3 | +## Goal |
| 4 | + |
| 5 | +Redesign the `Graph` page from a force-directed graph with decorative semantic overlays into a true semantic map. The new experience should visually track closer to the `ScivBook` homepage map while preserving SeevoMap's node density, public-domain taxonomy, and graph exploration workflow. |
| 6 | + |
| 7 | +This redesign must solve four user-facing problems: |
| 8 | + |
| 9 | +1. The current graph feels visually empty because the content sits inside a full-screen canvas without a strong stage. |
| 10 | +2. The current semantic axes feel pasted on rather than structurally meaningful. |
| 11 | +3. Dragging and zooming the whole full-screen canvas makes the graph feel tiny and unstable. |
| 12 | +4. The graph does not yet communicate domain structure and research maturity in a way that users can read at a glance. |
| 13 | + |
| 14 | +## User Experience |
| 15 | + |
| 16 | +### Core Interaction Model |
| 17 | + |
| 18 | +The page remains full-screen, but the graph itself is rendered inside a fixed semantic stage. Only the content inside that stage is pannable and zoomable. The surrounding canvas remains atmospheric background rather than interactive graph territory. |
| 19 | + |
| 20 | +The graph becomes a semantic research map with: |
| 21 | + |
| 22 | +- A stable stage boundary |
| 23 | +- A semantic x-axis and y-axis |
| 24 | +- Nine public domain labels placed along the x-axis |
| 25 | +- Reference Nobel prize beacons overlaid as orientation markers |
| 26 | +- SeevoMap nodes repositioned into semantic coordinates rather than raw force-layout positions |
| 27 | + |
| 28 | +### Reading Order |
| 29 | + |
| 30 | +The map is read as: |
| 31 | + |
| 32 | +- Left to right: `micro / abstract / method-oriented` to `macro / systems / real-world context` |
| 33 | +- Top to bottom: `Hypothesis-Led` to `Execution-Ready` |
| 34 | + |
| 35 | +The y-axis uses four explicit levels: |
| 36 | + |
| 37 | +1. `Hypothesis-Led` |
| 38 | +2. `Mechanism Proposal` |
| 39 | +3. `Experiment Loop` |
| 40 | +4. `Execution-Ready` |
| 41 | + |
| 42 | +### Domain Layer |
| 43 | + |
| 44 | +The x-axis keeps the micro-to-macro framing, but also carries the public domain vocabulary already established elsewhere in SeevoMap. |
| 45 | + |
| 46 | +The nine public domains remain: |
| 47 | + |
| 48 | +1. `Information Science` |
| 49 | +2. `Mathematics` |
| 50 | +3. `Physics` |
| 51 | +4. `Chemistry` |
| 52 | +5. `Life Science` |
| 53 | +6. `Medicine` |
| 54 | +7. `Engineering` |
| 55 | +8. `Earth & Space` |
| 56 | +9. `Economics` |
| 57 | + |
| 58 | +These labels appear as semantic bands or tick labels along the x-axis rather than as separate side taxonomies. |
| 59 | + |
| 60 | +## Semantic Positioning |
| 61 | + |
| 62 | +### X-Axis Positioning |
| 63 | + |
| 64 | +Each public domain is assigned a fixed anchor on the x-axis. These anchors are not inferred from current force-layout coordinates. They are part of the semantic design. |
| 65 | + |
| 66 | +Recommended ordering: |
| 67 | + |
| 68 | +- `Information Science` |
| 69 | +- `Mathematics` |
| 70 | +- `Physics` |
| 71 | +- `Chemistry` |
| 72 | +- `Life Science` |
| 73 | +- `Medicine` |
| 74 | +- `Engineering` |
| 75 | +- `Earth & Space` |
| 76 | +- `Economics` |
| 77 | + |
| 78 | +This ordering preserves the user's chosen left-to-right reading: more abstract and micro-oriented work on the left, broader systems and macro-oriented work on the right. |
| 79 | + |
| 80 | +Each node receives its x-position from its public-domain anchor plus a small deterministic local offset so clusters remain readable without losing the semantic category structure. |
| 81 | + |
| 82 | +### Y-Axis Positioning |
| 83 | + |
| 84 | +Each node is assigned to one of four execution-maturity bands. |
| 85 | + |
| 86 | +Recommended mapping rules: |
| 87 | + |
| 88 | +- `Hypothesis-Led` |
| 89 | + - `status === "hypothesis"` or concept-like nodes with no clear execution signal |
| 90 | +- `Mechanism Proposal` |
| 91 | + - proposed method changes, structured plans, or analysis-heavy nodes without a strong execution artifact |
| 92 | +- `Experiment Loop` |
| 93 | + - nodes with experiment framing, metric-bearing review content, or partial execution evidence |
| 94 | +- `Execution-Ready` |
| 95 | + - concrete execution assets, reproducible runs, usable results, or clearly reusable artifacts |
| 96 | + |
| 97 | +This layer should use explicit heuristics rather than hand placement. The heuristics should be local and deterministic so the graph remains stable across reloads. |
| 98 | + |
| 99 | +### Local Jitter / Packing |
| 100 | + |
| 101 | +Nodes should not stack on a perfect grid. After semantic band placement: |
| 102 | + |
| 103 | +- apply deterministic jitter seeded by node id |
| 104 | +- optionally run light local packing inside each semantic cell |
| 105 | +- preserve readable clusters without reintroducing a free-force layout |
| 106 | + |
| 107 | +The output should feel map-like, not spreadsheet-like. |
| 108 | + |
| 109 | +## Nobel Reference Layer |
| 110 | + |
| 111 | +The graph adds a second, lighter layer of `reference beacons` sourced from the ScivBook Nobel dataset. |
| 112 | + |
| 113 | +### Source |
| 114 | + |
| 115 | +Use: |
| 116 | + |
| 117 | +- `ScivBook/frontend/src/data/nobelPrizes.json` |
| 118 | +- selected scaling ideas from `ScivBook/frontend/src/data/scaleMap.ts` |
| 119 | + |
| 120 | +### Behavior |
| 121 | + |
| 122 | +Nobel beacons are not SeevoMap nodes. They are semantic references only. |
| 123 | + |
| 124 | +They should: |
| 125 | + |
| 126 | +- render above the background but below the main selected-node UI |
| 127 | +- use lighter visual weight than SeevoMap nodes |
| 128 | +- be non-filtering by default |
| 129 | +- help users read the semantic landscape |
| 130 | + |
| 131 | +They may be clickable later, but the first version only needs hover-level or static reference value. |
| 132 | + |
| 133 | +## Visual Design |
| 134 | + |
| 135 | +### Stage |
| 136 | + |
| 137 | +The graph sits inside a bounded semantic stage: |
| 138 | + |
| 139 | +- rounded rectangle or softly bounded map area |
| 140 | +- fixed internal draggable region |
| 141 | +- clear distinction between `interactive map stage` and `ambient page background` |
| 142 | + |
| 143 | +This stage must visually solve the current problem where the graph appears too small inside a huge empty viewport. |
| 144 | + |
| 145 | +### Boundary Language |
| 146 | + |
| 147 | +Borrow from ScivBook's visual logic: |
| 148 | + |
| 149 | +- soft territory envelopes |
| 150 | +- subtle internal guide lines |
| 151 | +- a map-like frame rather than chart axes pasted on a raw graph |
| 152 | + |
| 153 | +Avoid: |
| 154 | + |
| 155 | +- a pure scatter-plot look |
| 156 | +- full-screen free drag |
| 157 | +- heavy data-chart grid language |
| 158 | + |
| 159 | +### Node Layer |
| 160 | + |
| 161 | +Keep the current SeevoMap glow language and public-domain colors, but tighten them inside the semantic map: |
| 162 | + |
| 163 | +- SeevoMap nodes stay as the primary colored marks |
| 164 | +- Nobel beacons are lighter reference marks |
| 165 | +- edges should be reduced or localized so they support context without turning the map back into a wire cloud |
| 166 | + |
| 167 | +## Interaction |
| 168 | + |
| 169 | +### Pan / Zoom |
| 170 | + |
| 171 | +Only the semantic stage responds to drag and zoom. |
| 172 | + |
| 173 | +Behavior: |
| 174 | + |
| 175 | +- drag inside stage: pan |
| 176 | +- drag outside stage: no graph pan |
| 177 | +- zoom should keep the stage-centered composition stable |
| 178 | +- camera movement must be clamped so users do not lose the graph into large empty space |
| 179 | + |
| 180 | +### Drawer / Detail / Hover |
| 181 | + |
| 182 | +Keep the current Graph page shell: |
| 183 | + |
| 184 | +- top-left compact drawer trigger |
| 185 | +- public domain drawer |
| 186 | +- hover tooltip |
| 187 | +- selected-node detail panel |
| 188 | + |
| 189 | +These should continue to work with semantic node positions without changing their mental model. |
| 190 | + |
| 191 | +## Architecture |
| 192 | + |
| 193 | +### Data Model |
| 194 | + |
| 195 | +Do not mutate `map.json`. |
| 196 | + |
| 197 | +Introduce a semantic projection layer in the frontend: |
| 198 | + |
| 199 | +- input: raw `MapNode` |
| 200 | +- derive: |
| 201 | + - public domain group |
| 202 | + - semantic x-band |
| 203 | + - maturity y-band |
| 204 | + - deterministic local offset |
| 205 | +- output: |
| 206 | + - semantic screen-space world coordinates for the map renderer |
| 207 | + |
| 208 | +### Rendering Strategy |
| 209 | + |
| 210 | +Keep the high-density rendering split: |
| 211 | + |
| 212 | +- canvas for dense node and edge rendering |
| 213 | +- SVG overlay for stage frame, axis labels, guide lines, and Nobel reference layer |
| 214 | + |
| 215 | +This hybrid approach preserves performance while allowing cleaner semantic structure. |
| 216 | + |
| 217 | +### File Scope |
| 218 | + |
| 219 | +Primary implementation should stay within: |
| 220 | + |
| 221 | +- `src/components/GraphVisualization.tsx` |
| 222 | + |
| 223 | +Supporting additions are allowed in: |
| 224 | + |
| 225 | +- `src/utils/publicDomains.ts` |
| 226 | +- a new small utility file if semantic layout helpers become too large |
| 227 | + |
| 228 | +Avoid broad page-shell refactors for this pass. |
| 229 | + |
| 230 | +## Error Handling |
| 231 | + |
| 232 | +If Nobel data cannot load or is temporarily unavailable: |
| 233 | + |
| 234 | +- render the semantic stage and SeevoMap nodes normally |
| 235 | +- skip the Nobel reference layer |
| 236 | +- do not block the Graph page |
| 237 | + |
| 238 | +If a node cannot be classified cleanly into a maturity band: |
| 239 | + |
| 240 | +- fall back to `Experiment Loop` |
| 241 | + |
| 242 | +This keeps the graph stable without inventing obviously wrong extremes. |
| 243 | + |
| 244 | +## Testing |
| 245 | + |
| 246 | +### Functional Checks |
| 247 | + |
| 248 | +1. `npm run build` must pass. |
| 249 | +2. Local preview must render `/#/graph` without runtime errors. |
| 250 | +3. Dragging outside the stage must not pan the graph. |
| 251 | +4. Dragging inside the stage must pan the graph. |
| 252 | +5. Zoom must stay centered on the semantic stage and preserve graph readability. |
| 253 | +6. Drawer filtering must still work with semantic placement. |
| 254 | +7. Hover and detail panels must still resolve the correct node. |
| 255 | + |
| 256 | +### Visual Checks |
| 257 | + |
| 258 | +1. The graph should visually fill the semantic stage instead of shrinking into the center of a full-screen canvas. |
| 259 | +2. The x-axis should read as both: |
| 260 | + - micro → macro |
| 261 | + - public-domain sequence |
| 262 | +3. The y-axis should clearly communicate execution maturity. |
| 263 | +4. Nobel beacons should add orientation without overpowering SeevoMap nodes. |
| 264 | +5. The result should feel map-like rather than like a scatter plot with decorations. |
| 265 | + |
| 266 | +## Non-Goals |
| 267 | + |
| 268 | +- Do not change the deployed data format. |
| 269 | +- Do not add a new graph page route. |
| 270 | +- Do not expose internal `ai4s / science` taxonomy again. |
| 271 | +- Do not turn the graph into a general-purpose chart with numeric ticks. |
| 272 | +- Do not implement full Nobel-detail workflows in the first pass. |
0 commit comments