Skip to content

Layers and guardrails: src/ root files moved into core/ and platform/, a layer and cycle check, one build script, golden tests split by area - #9

Open
tomeyer97 wants to merge 8 commits into
test/goldensfrom
cn/00-layers
Open

tomeyer97 wants to merge 8 commits into
test/goldensfrom
cn/00-layers

Conversation

@tomeyer97

Copy link
Copy Markdown
Owner

Groundwork for the refactor, with no change in behaviour. The src/ root files move into core/, platform/ and their feature folders in one commit that only moves files and rewrites imports. npm run lint is new: it runs ESLint and a check of the layer rule (core < platform < features < ui < composition). That check records today's violations and caps the largest import cycle at its current size (55 files, 9 inside check/). The build is now one script with a file per target, and npm run watch and the VS Code task use it. The golden tests are split by area. Release calls CI, so both run the same tests.
The keybindings are generated from one chord table, command titles are in Title Case, and the understanding settings are now in Restricted Mode. The understanding check moves from the README to docs/understanding-check.md, and the 0.26.0 changelog is shorter.

Note Title Status
N381 src/ root is a 50-file mix of layers fixed
N001 CI and release run different test sets, both copied by hand fixed
N002 Release gate is a subset of CI fixed
N003 One unpinned tool among pinned ones fixed
N004 The watch task re-implements the build fixed
N005 One release is 160 lines; it reads as a development diary fixed
N006 The understanding check takes half the README fixed
N053 The example journey copies code text and line numbers 200+ times fixed (CI validates it; the data stays)
N054 Imports a .js that doesn't exist fixed
N055 sleep defined twice in a 6-file example declined (removing it would move lines the goldens pin)
N156 Command titles follow no single style partly ("Check my understanding" is quoted by the CLI and its goldens)
N157 340 lines of keybindings written four times each fixed
N928 The keymap table lives in a test, not in the code fixed
N158 Thread state is a string that menus regex-match partly (a test pins the words; the context builder comes later)
N159 A second mini-language for tree items partly (same test; the row helpers come later)
N160 Half of the ~85 commands are hidden plumbing partly (a test keeps the palette list from drifting)
N161 Settings namespaces don't line up partly (no renames; the scheme is documented)
N162 Build steps hidden in node -e one-liners partly (scripts/build/*.mjs; the test:* names stay)
N163 Restricted-mode list looks incomplete fixed
N939 Architecture rules enforced by grepping source fixed (ESLint rules)
N941 One tsconfig for extension, tests and nothing for the webviews partly (the webviews get their own config later)

Changed goldens

None.

Follow-ups

  • Turn on @typescript-eslint/no-floating-promises, and turn the disabled recommended rules back on as the code passes them.
  • Lint media/, and give the webview pages and harnesses a checkJs tsconfig with the DOM lib (the rest of N941).
  • Write the thread context and the tree-row contextValue as helpers in src/, and test package.json's when words against them (N158, N159).
  • Rename "Check my understanding" in one change, together with the CLI messages and goldens that quote it (N156).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant