Project grammar v3 items to presentation-driven rows (WS3 layer 1) - #2192
Closed
SawyerHood wants to merge 1 commit into
Closed
Project grammar v3 items to presentation-driven rows (WS3 layer 1)#2192SawyerHood wants to merge 1 commit into
SawyerHood wants to merge 1 commit into
Conversation
SawyerHood
force-pushed
the
ws3-l1-projection-presentation
branch
from
August 21, 2026 15:43
26c1f1b to
a8c8d6f
Compare
The bridges now persist a presentation on every item and emit fileRead, search, delegation, planSteps and extension items, but the projection rendered from the legacy path: fileRead/search were bridged onto tool rows, planSteps only fed the todo banner, extension items were dropped, and no row carried the presentation. - TimelineRow: every work row projected from a provider item carries the persisted `presentation`; new `file-read`, `search`, `plan-steps` and `extension` work rows; delegation rows carry `childRef` and `background`. - thread-view: the begin/end item family (web-activity-lifecycle) covers the four new kinds with their own terminal status; delegation items take `item/delegation/progress`; suppression honours `presentation.suppress` on every kind (failed items always render); titles use the bridge label first and fall back to the legacy derivation for pre-presentation rows; exploration bundles, dedupe and counts treat a v3 read/search like a legacy Read/Grep through `timelineRowActivityIntents`. - server/db: delegated-child fetch and parent closure cover v3 delegation items (children were orphaned when the parent fell outside the window); the todo head-state backfill includes the latest planSteps snapshot by kind. - client-core/app/mobile: render signatures and exhaustive switches know the new kinds (title-only until the renderer layers land). - Corpus harness: a PR carries its allowlist in the repo (BB_PROVIDER_CORPUS_ALLOWLIST) and snapshots into a shadow dir (BB_PROVIDER_CORPUS_SNAPSHOT_DIR); the shared baseline stays main-minted. Corpus A4 vs a baseline minted from origin/main: one diff class, legacy delegation rows gain `childRef: null` / `background: false`. Parity A2: 39 passed, 0 failed, 13 skipped; 29 entries for the presentation field, the delegation fields and the file-read rows.
SawyerHood
force-pushed
the
ws3-l1-projection-presentation
branch
from
August 21, 2026 15:43
a8c8d6f to
efee937
Compare
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.
WS3 layer 1 of 5 (projection + renderers + mobile). Stack base:
main. Do not merge — the coordinator reviews, Sawyer merges the stack.What was wrong
The v3 stack (#2124 → #2136 → #2153 → #2148 → #2121 → #2164 → #2178 → #2179) made every bridge persist a
presentationon each item and emitfileRead,search,delegation,planStepsandextensionitems. The projection still rendered from the legacy path:fileRead/searchwere bridged ontotoolrows with a synthesized intent,planStepsonly fed the todo banner,extensionitems fell through the dispatch loop and were dropped,item/delegation/progresswas unhandled, and noTimelineRowcarried the presentation (the canary's observations in STUB-INVENTORY: "extension rows do not render; row labels ignore presentation"). Two server gaps came with it: the delegated-child fetch and parent closure in the timeline service were keyed onitemKind = 'toolCall', so a v3delegationitem whose child turn fell outside the window lost its children, and the todo head-state backfill queried TodoWrite/Task* by tool name only, so a budgeted window could drop a v3planStepsbanner.What changed
packages/server-contract/src/thread-timeline.ts): every work row projected from a provider item has an optionalpresentation(TimelineRowPresentation= the persistedThreadEventItemPresentation); newfile-read,search,plan-stepsandextensionwork rows (extensionrequirespresentation); delegation rows carrychildRefandbackground.packages/thread-view):web-activity-lifecycleis now the begin/end item family for web research plus the four new kinds, each settling with its own terminal status; delegation items takeitem/delegation/progressand revise their label;shouldSuppressLowValueToolCallhonourspresentation.suppresson every kind (failed/interrupted items always render; a suppressedplanStepsstill drives the banner);timelineRowActivityIntentsderives the legacy read/search/list intent from afile-read/searchrow so bundles, dedupe, counts and compact rendering treat a v3 read like a legacyRead. Titles: a row with a presentation renderslabel[pending|completed]+ its structured content (path, query, child description, or the bridge'stitle); pre-presentation rows keep the legacy derivation, so old threads render unchanged.listStoredDelegatingItemRowsByItemIdsand the child fetch covertoolCallanddelegationparents (two queries so the partial tool-call index stays in use; delegation rows walk the thread/type/kind index);listTodoSnapshotEventRowsForThreadadds the latestplanStepssnapshot by kind;CROSS_TURN_TOOL_ITEM_KINDSincludes the v3 kinds.BB_PROVIDER_CORPUS_ALLOWLISTmerges a repo-carried allowlist after the shared file;BB_PROVIDER_CORPUS_SNAPSHOT_DIRredirects write/compare to a shadow rows dir. This PR's allowlist:apps/server/test/provider-corpus/allowlists/ws3-projection-rows.json. Docs + script header updated.HOST_DAEMON_PROTOCOL_VERSIONunchanged. No Drizzle change in this layer (layer 5 carries migration 0107).Deferred to layer 5 with its migration:
hasParentedEventCrossingSequencestill probestoolCallparents only (the partial index predicate); a mid-delegation in-turn cut is correct but rereads descendants.How you verified
packages/thread-view/test/v3-item-projection.test.tsrewritten: file-read/search rows equal legacy Read/Grep/Glob intents, bundle grouping, presentation-labelled tool rows (pending/completed/failed), presentation over statusLabels, planSteps row + banner, extension rows (completed + pending), v3 delegation fields, suppression across kinds. Harness gainsplanSteps/extensionfactories andpresentationon every v3 factory.turbo test --filter=@bb/thread-view: 397 passed.turbo typecheck --filter=...@bb/server-contract(48 packages) clean.turbo testfor@bb/db,@bb/client-core,@bb/mobile,@bb/server-contract,@bb/provider-paritygreen;@bb/server1896 passed, 1 failed = the known local umask 0002internal-skill-treesmode 0644/0664 case (passes in CI).origin/main15f21ad (private shadow dir, not the shared baseline): 307 threads, 93,534 rows, 0 unlisted diffs, 566 allowed in one class — legacy delegation rows gainchildRef: null/background: false. Perf gate green: walk 0.93–1.00× of baseline, latest 0.74–1.13× (load 3.3/16 cores).pnpm parity --old ~/.bb/parity-old-main@15f21ade7 --new .): 39 passed, 0 failed, 13 skipped (pi in-process, model-list process-scoped). 29 allowlist entries under Project grammar v3 items to presentation-driven rows (WS3 layer 1) #2192: thepresentationfield on every presented row,childRef/backgroundon delegation rows, and the claude plan-mode Read calls projecting asfile-readrows.unhandled N→N).