Conversation
…views One pure classifier, fileKind(path, generated?), in @plannotator/core (the built-in generated name list moves there; shared/generated-files.ts re-exports it and Pi vendors it). Three icons in @plannotator/guide-viewer. - Tree: Code / Tests / Generated blocks when a change has 2+ kinds, under the Git status section header with icon, count, viewed/total and +/-. Generated starts folded. "Group by kind" switch in Tree controls, default on, cookie-only. j/k and the all-files order follow the blocks. - Flask on test diff headers and Git status rows. - Guided Reviews: within a chapter, code first, then "Tests N", then "Generated N" (folded); subheads only with 2+ kinds; author order kept. - guides.show JS budget +1 KB (owner-approved); manifest regenerated.
…ock on any activation - .test./.spec./_test count only before a code extension, so openapi.spec.yaml, payment.spec.json and load_test.md stay code. - Tests also: conftest.py, Django tests.py, *.cy.*, *.e2e.*, *.test-d.ts, Gradle src/<name>Test and testFixtures, .NET *.Tests / *.UnitTests. - A file that becomes active by any route opens its folded kind block (not only j/k); a new file list never does. - Hide-viewed hides a kind block whose rows are all hidden. - AllFilesOrder type moved below the imports.
# Conflicts: # packages/core/guide-viewer-manifest.ts
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds the approved design record
review-file-kinds(approved 2026-10-14 in the Inbox thread "pulls.review inspiration"): three file kinds — Code, Tests, Generated — in the code review file tree and in Guided Reviews.What changed
One classifier —
fileKind(path, generated?)in@plannotator/core/file-kind. It is pure and browser-safe, and Pi vendors it.generatedFiles,.gitattributesincluded). Without a set, the built-in name list decides. That list (DEFAULT_GENERATED_PATTERNS,isDefaultGeneratedPath) moved fromshared/generated-files.tsinto core. Shared re-exports it, so the server's behavior is unchanged..test.,.spec.,.cy.,.e2e.,.test-d.or_test.followed by a code extension (ts, tsx, js, jsx, mjs, cjs, mts, cts, py, go, rs, java, kt, kts, rb, swift, cs, fs, ex, exs, php, scala, dart, groovy, clj, lua, c/cpp/h, vue, svelte, …), each with a name before the marker;*.stories.*(any extension);test_*.py,conftest.py, Djangotests.py;*.snap;__tests__,__snapshots__,__fixtures__,__mocks__,test,tests,spec,e2e,fixtures,testdata,testFixtures(case-insensitive, so Swift'sTests/counts), a Gradle/Kotlin source setsrc/<name>Test(androidTest,commonTest,integrationTest; only directly undersrc), or a .NET*.Tests/*.UnitTestsproject folder.contest.ts,latest.ts,test.ts,src/testing/…,testing-library.config.js,jest.config.js,docs/spec.md,.github/workflows/test.yml,openapi.spec.yaml,contracts/payment.spec.json,scripts/load_test.md.groupByFileKindsplits a list into the three kinds and keeps each item's order.Icons —
FileKindIconin@plannotator/guide-viewer/FileKindIcon. It has the mock's three glyphs (angle brackets, a flask, a package) on the 24-unit grid with stroke 2. The review app, the Inbox and guides.show share it.Code review tree:
PanelSectionHeader;SectionsPanelnow uses the same component) plus the icon, file count, viewed/total and +/-.plannotator-review-group-by-kind=offwhen turned off.TreeSwitchhelper (same markup).fileOrder: 'kind') follow the blocks.Guided Reviews (
GuideSectionCard/GuideFileCard):mountCollapsed).generatedFileson the guide host (the review app does). The Inbox and guides.show use the name list.guides.show:
OpenInAppButtonout of the viewer. The 1 KB budget raise is therefore no longer needed, and the budget stays at 400 KB (unchanged from main).sync:manifestregeneratedpackages/core/guide-viewer-manifest.ts(check:manifestandcheck:budgetspass).viewer.DERExLls.js, 336.2 KB gz (344,294 bytes) against the 400 KB budget. Main after open-in: same-origin and session guards, no implicit OS-default launch #1915 is about 334.9 KB, so this feature costs about 1.3 KB gz.deploy:viewerwas not run; it happens at release.Screenshots
Taken from the real built review app on a demo diff with code, tests and generated files, plus a guide exported from the same diff and opened in a locally built guides.show viewer. The files are local, in
/tmp/file-kinds-shots/:before-tree-dark.pngafter-tree-dark.png(Code / Tests / Generated blocks; all-files in block order)before-tree-dark-tree-controls.pngafter-tree-dark-tree-controls.png("Group by kind" switch)after-tests-dark.png(Tests block; flask on the diff header)after-code-folded-dark.png(Code folded, Generated opened)after-git-status-dark.png(Git status keeps its sections; flask on test rows)before-guide-dark.png,before-guide-dark-full.pngafter-guide-dark.png,after-guide-dark-full.png(Tests and Generated subheads; generated card folded)Tests
packages/core/file-kind.test.ts(real-world layouts, including conftest/tests.py,.cy./.e2e./.test-d., Gradle source sets, testFixtures and .NET test projects, plus the must-stay-Code names and non-code extensions);packages/review-editor/utils/fileKindTree.test.ts;FileTree.fileKinds.test.tsx(blocks, folding, one kind / switch off, j/k order, opening on any activation, hide-viewed, the switch),FileHeader.fileKind.test.tsxandpackages/guide-viewer/GuideSectionCard.fileKinds.test.tsx(1 kind, 2 or more kinds, folding, the host set).test.yml, and the allowlist guard passes.DOM_TESTS=1 bun testinpackages/review-editor(728 pass) andpackages/guide-viewer(37 pass);bun test packages/core(458 pass);tests/entry-assets.test.ts(35 pass, no diagram engines imported);apps/guides-showtests (41 pass).bun test(before the follow-ups): 7929 pass, 1 fail,apps/pi-extension/server/network.test.ts"configured browser launch", a timing flake under load that passes alone (38/38).bun run typecheckexits 0.packages/inbox/tsconfig.guide.jsonandapps/guides-show/tsconfig.viewer.jsonreport 0 errors. That was wrong (my script called a tsc path that does not exist). Run directly with the repo's TypeScript 5.8.3, they report pre-existing errors (5 and 6), as doesapps/inbox/tsconfig.json(7). None is in a file or line this PR adds; they are in Inbox components,useEditSession.ts,CallFlowRawView.tsx,call-flow-types.ts,workerPool.tsxand two untouched selection lines ofAllFilesCodeView.tsx. These configs are not CI gates.bun run --cwd apps/review buildandbun run build:hookpass.Left out (parked by the owner, or outside v2)
.gitattributeskind override, group headers between diffs in all-files, and the review overview.