Skip to content

Render the grammar v3 kinds on mobile from their declarative base (WS3 layer 3) - #2208

Closed
SawyerHood wants to merge 1 commit into
ws3-l2-web-renderersfrom
ws3-l3-mobile-declarative-base
Closed

Render the grammar v3 kinds on mobile from their declarative base (WS3 layer 3)#2208
SawyerHood wants to merge 1 commit into
ws3-l2-web-renderersfrom
ws3-l3-mobile-declarative-base

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

WS3 layer 3 of 5, stacked on #2206 (layer 2: web renderers). Do not merge — the coordinator reviews, Sawyer merges the stack.

What was wrong

The contract PR's G4 kind map (apps/mobile/src/screens/thread/timeline/item-kind-map.ts) left five WS3 fallbacks: fileRead, search, planSteps, delegation and extension fell through to FallbackTimelineRow (a raw JSON dump). Mobile read no presentation at all — glyphs came from a workKind table, an extension row had no renderer, and a tool row's bridge detail never showed. Per §5, mobile must render the declarative base for every kind with no plugin JS.

What changed

  • Renderers (renderers/work/PresentationWorkRows.tsx): FileReadWorkRow and SearchWorkRow are title-only (the shared title builder from layer 1 already reads the bridge label + the path/query); PlanStepsWorkRow lists the steps in the agent's order with a status glyph each (Square/Check/X), dims settled steps, and shows the explanation and detail; ExtensionWorkRow renders the presentation detail as Markdown under a host header and is expandable only when there is one. The v3 delegation item folds onto the existing DelegationWorkRow. All four registered in renderers/work/index.ts; the kind map's five { fallback } entries become { row }.
  • Glyph + tint: leadingIconForWorkRow takes the bridge's glyph when isIconName knows it (per-kind fallback otherwise); leadingIconTintForWorkRow(row, mode) picks the light/dark tint for the current theme mode after a colour-grammar check; ExpandableRowHeader gains leadingIconColor. ToolWorkRow shows the presentation detail above the call card.
  • Showcase + flow: /dev/work-rows gains a "Presentation-driven rows" section (completed + pending reads, content + path searches, a tinted tool with detail, a plan with an active and a failed step, a tinted extension row and a pending one). e2e/flows/phase4a-work-rows.yaml asserts each and takes three screenshots (phase4a-work-rows-presentation-tool, -plan-steps, -extension).
  • No wire change; no server change.

How you verified

  • turbo test --filter=@bb/mobile: 124 files, 841 passed — includes the G4 exhaustiveness test (every { row } names a registered kind; no fallback left for WS3) and new work-row-model tests for the bridge glyph (known / unknown / skill-read override) and the per-mode tint (valid / refused / bb-authored rows).
  • turbo typecheck --filter=@bb/mobile clean.
  • iOS Simulator: not runnable from this Linux worktree (no Xcode; mobile is a native Expo app with no web target). The Maestro flow above is the simulator evidence path: apply the mobile-e2e label or run pnpm --filter @bb/mobile e2e:ios on a Mac; the three screenshots land in the flow's artifacts. I could not produce them here and am saying so rather than fabricating them.

AGENT GENERATED: by Claude Opus 5

…3 layer 3)

Mobile renders the declarative base for every kind and loads no plugin JS
(docs/provider-plugin-api.md §5). The G4 kind map had five WS3 fallbacks;
each now names a registered row renderer.

- `work:file-read` / `work:search`: title-only rows (the title builder
  already speaks the bridge label + structured content).
- `work:plan-steps`: the snapshot's steps in the agent's order, a status
  glyph each, the explanation and the presentation detail above.
- `work:extension`: header from the presentation (label, glyph, tint),
  body = the presentation `detail` as Markdown; expandable only with one.
- `work:delegation`: the v3 delegation item folds onto the existing
  delegation renderer (layer 1 projects it there).
- Every work row's leading glyph is the bridge's glyph when the host knows
  it, tinted per theme mode from `presentation.tint` (colour grammar
  checked); tool rows show the presentation detail above the call card.
- `/dev/work-rows` showcase gains a presentation section (reads, searches,
  tinted tool, plan, extension, pending variants) and the Maestro
  `phase4a-work-rows` flow asserts each, with screenshots. The flow runs on
  the macOS `mobile-e2e` runner; this Linux box has no simulator.

`turbo test --filter=@bb/mobile`: 841 passed (G4 exhaustiveness,
glyph/tint model tests).
@SawyerHood
SawyerHood force-pushed the ws3-l3-mobile-declarative-base branch from 2173663 to 8cc9ea0 Compare August 21, 2026 18:09
@SawyerHood SawyerHood closed this Aug 21, 2026
@SawyerHood
SawyerHood deleted the ws3-l3-mobile-declarative-base branch August 21, 2026 21:40
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