Repository navigation
Description
As a developer adding or looking for a feature,
I want apps/vscode-extension/src/ organized into nested subdirectories by feature and logical area, with one obvious home for each piece of functionality,
so that it is clear where everything lives, how the parts connect, and the code base can grow without new files landing in arbitrary places.
Context
Requested by the maintainer on 2026-11-25 as an extension of epic #26. Today src/ mixes several organizing schemes: some folders are by feature (code_analysis/, servers/), some by technical layer (views/, commands/, utils/), and some features are split across both (for example src/active_servers/views/ and src/views/active_servers/). Folder names mix snake_case and camelCase.
Scope
-
Analysis first (
docs/cleanup/src-layout.md):- the current tree with file counts per folder;
- the problems: duplicated homes, mixed naming, cross-feature reach-ins, folders with a single file;
- the target tree;
- a complete old-path → new-path move map;
- the move order.
The target must be consistent with the layering of [Story] Clean the module layering in preparation for the IDE (no host abstraction yet) #42 and leave a clean cut for the later
packages/coreextraction ([Story] Extract a host-agnostic Code-XR core from the VS Code extension #13). It must not introduce that abstraction itself. -
The move: one commit per feature area, using
git mvso history follows the files.- Same commit as each move: update every import, the webpack entry and copy config, test text pins (
readFileSyncofsrc/paths, retargeted with the move map), the guardrail baseline, the feature baseline, and docs (ARCHITECTURE.mdmodule map,CLAUDE.md, skills). - Folder naming: one convention, recorded in the doc.
- Same commit as each move: update every import, the webpack entry and copy config, test text pins (
-
Guard: a test that pins the top-level layout and the folder-naming convention, so new code follows it.
Acceptance criteria
- The target tree and the move map are written and reviewed before any file moves.
- Every feature has exactly one home folder. No
views/<feature>next to<feature>/viewsduplicates remain. - One folder-naming convention across
src/. - Behaviour-neutral:
npm test,test:analysisand the feature-baseline test green after every commit;- the production bundle exports and the registered command set are unchanged;
- the VSIX listing changes only in
dist/internals.
-
ARCHITECTURE.mdmodule map rewritten to the new tree. - Sequenced after [Story] Route all diagnostics through the logger and the CodeXR output channel #34, [Story] Simplify and de-duplicate the TypeScript analysis pipeline, export and settings code #35, [Story] Make the sidebar tree and the scene asset pipeline data-driven #40 and [Story] Clean the module layering in preparation for the IDE (no host abstraction yet) #42 to avoid conflicting moves, and before the final verification ([Story] Final verification, measurements and report of the cleanup #43).
Activity
docs(cleanup): refresh the #55/#56 analysis after #40 merged
Merge pull request #59 from Code-XR-Project/claude/project-thread-n2s…
aMonteSl commentedon Nov 25, 2026
The maintainer approved the target tree in
docs/cleanup/src-layout.md(#59, merged) on 2026-11-25:app/ → features/ → core/ → platform/ → shared/;The move starts once #35 and #42 have merged.
Generated by Claude Code
refactor(src): dissolve the views and analysis-views barrels (#55 B0)
refactor(src): dissolve the analysis-commands barrels (#55 B0)
refactor(src): dissolve the collaboration and remote-access barrels (#55
refactor(src): dissolve the remaining re-export barrels (#55 B0)
refactor(src): move platform and shared files into place (#55 B1)
refactor(src): move visualization settings into core/charts/settings …
refactor(src): move the visualize-data feature into features/visualiz…
refactor(src): move the BabiaXR examples into features/examples (#55 B6)
refactor(src): move the chart template system into core/charts (#55 B7)
refactor(src): move collaboration and remote access into core/ and fe…
refactor(src): move the server runtime and registry into core/server (#…
refactor(src): move the servers and active-servers features into feat…
refactor(src): move dependencies, history and export into core/ (#55 …
refactor(src): move the analysis engine into core/analysis (#55 B12)
refactor(src): move the analysis section into features/analysis (#55 …
refactor(src): move the composition root into app/ (#55 B14)
test(tooling): pin the feature-first src/ layout (#55)
Merge pull request #65 from Code-XR-Project/claude/project-thread-n2s…
aMonteSl commentedon Nov 25, 2026
Done.
src/is reorganized feature-first and merged intov1.2.1via #65, with CI green on Linux, Windows and macOS.Layout:
extension.ts+app/→features/→core/→platform/→shared/. Every folder is kebab-case, and the 46 re-export barrels are dissolved.Shape:
index.tsfilesfolderDependencies.json)How it was proved for every batch:
The VSIX holds the same 199 files.
Kept in place:
test/tooling/srcLayout.test.cjsguards the layout, the move map is indocs/cleanup/src-move-map.json, and the result is §7 ofdocs/cleanup/src-layout.md.Still to do: the F5 smoke (open the sidebar, run one XR analysis, start and stop a server). It runs in #43.
Generated by Claude Code