Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
| `npm run test:htmlanalysis` | `test/runners/run-html-analysis-tests.cjs`: `test/analysis/livePanelDomIntegration.test.cjs` plus the Python suite `backend/tests/html_dom/` | After touching `backend/src/html/html_dom_parser.py` or DOM mode |
| `npm run test:xr-harness` | `test/runners/run-xr-containment-harness.cjs` (browser harness, uses Playwright) | After touching table/containment runtimes |
| `npm run test:xr-chart-bounds-harness` | `test/runners/run-xr-chart-bounds-harness.cjs` (generates REAL directory scenes with the compiled generator, opens them with A-Frame + BabiaXR in Playwright, asserts every chart type ends on the table for 3/30/300 files and that row-budgeted charts only ever read the slice; `CODEXR_CHART_BOUNDS_TYPES` / `CODEXR_CHART_BOUNDS_ROWS` narrow it; about 4 minutes) | After touching chart generation, containment, the row slice or the Babia compatibility patches |
| `npm run test:xr-mode-harness` | `test/runners/run-xr-mode-cycle-harness.cjs` — static contract over `test/manual/xr-mode-cycle-harness.html`, then (with Playwright) walks the analysis selector through every mode and back, asserting the controller's view/mode state at each step | After touching the analysis-mode controller, mapping UI, historical comparison or dependency graph runtimes |
| `npm run test:xr-mode-harness` | `test/runners/run-xr-mode-cycle-harness.cjs` — static contract over `test/manual/xr-mode-cycle-harness.html`, then (with Playwright) walks the analysis selector through every mode and back, asserting the controller's view/mode state at each step. Served over HTTP (`test/helpers/staticHttpServer.cjs`), so the modes' datasets really load; from `file://` Chromium blocked every fetch | After touching the analysis-mode controller, mapping UI, historical comparison or dependency graph runtimes |
| `npm run test:project-evolution-harness` | `test/runners/run-project-evolution-harness.cjs` — Project Evolution playback harness (screenshots under `output/project-evolution-harness/`) | After touching project-evolution runtime |
| `npm run test:xr-immersive-harness` | `test/runners/run-xr-immersive-harness.cjs` — AR/VR semantics against real A-Frame: AR hide/keep sets, rig floor-align + AR recenter, pointer handover; plus a static contract over both scene templates | After touching the scene templates, pointer-policy or immersive-rig |
| `npm run package` | Production webpack build (hidden source maps) | Pre-packaging |
Expand Down
9 changes: 9 additions & 0 deletions apps/vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@

#### Fixed

- **The analysis switcher in the XR scene no longer gets stuck.** One analysis that never finished opening (a dependency or comparison file that never arrived over a slow tunnel, for example) froze the switcher for the rest of the session: every later pick, Normal analysis included, waited behind it until the page was reloaded. Several related problems are fixed:
- A new pick now cancels the analysis that is still opening and starts at once, and an analysis that takes longer than 45 s to open (90 s for project evolution) is reported as failed.
- When an analysis cannot open, the selector says why, and its option reads "Retry: …". Before, the message went to a panel that is hidden while the selector is up, so nothing seemed to happen. The failed analysis is no longer reopened by the "Analyses" button or by the room's echo of the pick, and the other participants are sent back to the selector instead of staying in the failed analysis.
- Dependency data that cannot be loaded (a server error, a stale link after a restart) now fails visibly instead of leaving an empty table whose panel says "ready", and the error stays on the dependency panel.
- Picking an analysis right after opening the selector no longer snaps you, and everyone in the room, back to the empty selector a second later.
- Opening the dependency graph shows its progress on the selector; a second click says it is still opening; a long first analysis is no longer reported as "did not respond" after 20 s while it is still progressing; picking it while a refresh runs joins that refresh instead of being refused; and the start request stops retrying after 20 s without a connection, with a message.
- Re-entering project evolution after a frame that failed half-way no longer throws and bounces to the selector every time.
- A chart that was hidden while its fit animation ran no longer reappears on the empty selector when the animation ends.
- In collaboration, one part of the scene that fails to apply a room update no longer silently drops the rest of it (the analysis shown is applied last and the failure is logged), a page that rejoins a restarted session follows the room again, a late-loading page keeps waiting for the room instead of giving up after 3 s, and reconnecting backs off up to 15 s instead of retrying every 0.9 s.
- **Panels in the XR scene no longer show the content behind them.** Opening an element's info card in front of a virtual screen or the guide mixed the text of both: the card skipped the depth test, and the scene draws see-through surfaces in page order rather than by distance, so screens farther away were painted over it. Info cards, the dependency-graph path chip, virtual screens, the guide, the controller panel, the "Virtual screens" list, the comparison card and the evolution overlay now have opaque, depth-tested backings. Clicking an info card no longer passes through it to whatever is behind (it could start a screen share), and a virtual screen's idle message now wraps inside the screen instead of spilling past its edges.
- **XR scenes keep updating after the connection to VS Code drops.** After any network error the scene reconnected with a connection that listened to nothing, so it silently stopped following re-analyses until the page was reloaded. It now reconnects with every handler in place, leaves the browser's own retry alone and backs off up to 30 s when the server is gone. A refresh also no longer breaks the chart's row-limited data source (it was pointed at the page itself), keeps the other parameters of a data URL such as a comparison's revision, and repairs a data URL that had been corrupted to `url: url: ./data.json` at startup. The DOM visualization no longer reloads the page every 3 s while the server is unreachable; it reloads once, when the connection is back.
- **Historical comparison and project evolution no longer refuse a folder opened through a link.** When the analyzed folder was reached through a symbolic link, a junction, or a shortened Windows path (`C:\Users\JOHNDO~1\...`), Code-XR compared it with the repository path Git reports and wrongly concluded the folder was outside the repository, so the Git-based analyses were unavailable. Both paths are now resolved to their real location before they are compared.
Expand Down
20 changes: 20 additions & 0 deletions apps/vscode-extension/templates/components/COMPONENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ its parts directory. Manual harnesses load assembled copies from
- Feeds row-budgeted charts (everything except boats) from a top-N sliced `babia-queryjson` datasource (`chartDataSlice.js` part): ranked by the mapped magnitude, rows violating `numeric-positive` value rules filtered out, one row per Babia element key. Chart construction (rotation, base attributes, budgets) follows the generator-injected presentation profile (`#codexr-chart-base-config`), with a fallback mirror in `mappingProfiles.js`.
- `codexr/analysis-mode/analysisModeRuntime.js`
- Owns mode switching between normal analysis, historical comparison and dependency graph.
- **Mode lifecycle contract** (epic #72, S7). `changeAnalysis` cancels instead of queueing:
a newer pick aborts the activation in flight (`activation.signal`, also on
`activation.token.signal`; `token.isCurrent()` turns false) and starts at once. A lifecycle
passes that signal to every `fetch` and returns early from `activate` when the token is no
longer current. `activate` has a timeout (`activateTimeoutMs` on the lifecycle, default 45 s;
project evolution declares 90 s); `captureState`/`restoreState`/`deactivate` are abandoned
after 8 s. An abandoned activate that settles later is deactivated once more. A failure (throw,
rejection or timeout) lands on the selector with the reason on its own status line and the
failed option relabelled "Retry: …", does not become `requestedMode`, and sends
`analysis-mode-selection` when the pick was local (not for a failure caused by the room's
echo); the echo of the failed pick is ignored for 5 s. `openSelector` announces the selection
only if no newer pick happened meanwhile. A mode reports opening progress with
`setSelectorStatus(message, tone)`. `getState()` exposes `activation`, `lastError` and
`selectorStatus`. A lifecycle whose data cannot load must reject (dependency graph and
historical comparison do, through `applySharedState(snapshot, { signal, rethrow: true })`),
never sit on an empty table that says "ready". Pinned by
`test/analysis/analysisModeLifecycleContract.test.cjs`.
- `codexr/dependency-graph/dependencyGraphRuntime.js`
- Owns the dependency graph visualization, layouts, filters, navigation and dependency-specific interaction.
- Uses `CodeXRCommonRuntime` for tooltip presentation and billboard behavior.
Expand Down Expand Up @@ -89,6 +106,9 @@ its parts directory. Manual harnesses load assembled copies from
- Owns shared presence, identity, avatars, pointers and collaboration entities.
- Terminal disconnects show a full-page screen (`disconnectScreen.js` part) and stop
the reconnect loop: `session-ended` (host stopped the server) and `participant-kick`.
- Reconnects back off exponentially (0.9 s doubling, 15 s cap, jitter), reset on open. A
runtime that throws while applying a message or a snapshot entity is logged and isolated, so
the rest of the snapshot still applies; the `analysis-view` entity is applied last.
- **Passive mode-entity contract** (applies to EVERY analysis-mode runtime, present and future):
a mode's shared entity (`dependency-graph`, `historical-comparison`, `project-evolution`, …)
carries DATA, never intent. `applySharedState` stores the payload and renders only if its own
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,26 @@
selectionPanelView: 'visualization-mode',
controllerView: 'single.mapping',
panelRoot: null,
openingSelectorFromPanel: false
openingSelectorFromPanel: false,
// The activation in flight ({ mode, generation, abort }): a newer intent
// aborts it instead of queueing behind it (LIFECYCLE-1).
activation: null,
// The last activation that failed ({ mode, message, at }), shown on the
// selector until the next successful one (LIFECYCLE-3).
lastError: null,
// The room's echo of a mode that just failed here is not re-run.
suppressEcho: null,
// A progress line a mode reports while it opens, shown on the selector.
selectorStatus: null
};
// A mode's activate may take this long before it is treated as failed; a
// lifecycle can declare its own activateTimeoutMs (project evolution does).
var DEFAULT_ACTIVATE_TIMEOUT_MS = 45000;
// captureState/restoreState/deactivate are cleanup steps: one that hangs
// must not hold the switcher.
var LIFECYCLE_HOOK_TIMEOUT_MS = 8000;
// How long the room's echo of a mode that failed here is ignored.
var FAILED_MODE_ECHO_WINDOW_MS = 5000;

function debugLog() {
var args = Array.prototype.slice.call(arguments);
Expand Down
Loading
Loading