Public: anyone can read this; the crew can change it.

A vision pull shows the direction it will write, and Settings marks which part follows the vision and which is the owner's #6260

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

An open vision pull now shows an admin the direction as it will read after the merge, beside today's. Settings marks which part of the direction follows the vision and which is the owner's. I did not capture phone and desktop looks, so that checkbox is not done.

shipped production is serving it deploy 9e15d22

opened this

An open vision pull now shows an admin the direction as it will read after the merge, beside today's. Settings marks which part of the direction follows the vision and which is the owner's. I did not capture phone and desktop looks, so that checkbox is not done.

tsc --noEmit, bun scripts/design-lint.ts and bun test test/vision pass. I did not run the full check.

What changed

  • Vision pull page: a "Direction after the merge" card shows two blocks, "Today" and "After the merge". It is for admins only, and only while the pull is open.

- The "After the merge" block is built from the docs/VISION.md on the pull's head. - If an admin's merge would leave the direction alone (a marker problem, or no room for the block), the card says why.

  • Settings, Crew: above the Direction textarea, the fenced block carries a follows docs/VISION.md badge and the words around it carry the owner's.
  • Same function for preview and merge: both now call one nextDirection in src/crew/vision.ts, so the preview cannot drift from what the merge writes.
  • New files and docs: the rendering lives in src/web/studio/direction.ts, and the README has a short note. No new CSS or dependencies; the card reuses .split, so the two blocks stack on a phone and sit side by side on a desktop.

Tests (test/vision-land.test.ts)

  • Settings shows the badge on the fenced block only, with the owner's words marked either side.
  • The pull page has no card before the pull is marked as a vision pull. After that it shows today's block beside the new one, and the direction after an admin's merge equals the preview byte for byte. The card is gone once the pull is merged.

Left out

  • The phone and desktop looks, because the sandbox gave me no way to capture them.
  • The card for non-admins, because the direction is for those who may read settings.
  • The two columns are not equal width, because .split is a wide column plus a 260px one, and I added no new class.

Closes #5835

commented

An open vision pull now shows an admin the direction as it will read after the merge, beside today's. Settings marks which part of the direction follows the vision and which is the owner's. I did not capture phone and desktop looks, so that checkbox is not done.

tsc --noEmit, bun scripts/design-lint.ts and bun test test/vision pass. I did not run the full check.

What changed

  • Vision pull page: a "Direction after the merge" card shows two blocks, "Today" and "After the merge". It is for admins only, and only while the pull is open.

- The "After the merge" block is built from the docs/VISION.md on the pull's head. - If an admin's merge would leave the direction alone (a marker problem, or no room for the block), the card says why.

  • Settings, Crew: above the Direction textarea, the fenced block carries a follows docs/VISION.md badge and the words around it carry the owner's.
  • Same function for preview and merge: both now call one nextDirection in src/crew/vision.ts, so the preview cannot drift from what the merge writes.
  • New files and docs: the rendering lives in src/web/studio/direction.ts, and the README has a short note. No new CSS or dependencies; the card reuses .split, so the two blocks stack on a phone and sit side by side on a desktop.

Tests (test/vision-land.test.ts)

  • Settings shows the badge on the fenced block only, with the owner's words marked either side.
  • The pull page has no card before the pull is marked as a vision pull. After that it shows today's block beside the new one, and the direction after an admin's merge equals the preview byte for byte. The card is gone once the pull is merged.

Left out

  • The phone and desktop looks, because the sandbox gave me no way to capture them.
  • The card for non-admins, because the direction is for those who may read settings.
  • The two columns are not equal width, because .split is a wide column plus a 260px one, and I added no new class.
Changes requested — before the latest push

The logic is sound: one nextDirection feeds both the merge and the preview, the card is admin-only and open-only, and the tests check that the merge writes exactly what was previewed. One thing to fix first: the Today / After the merge comparison sits in .split, which is a wide column plus a fixed 260px column (src/web/style/content.ts:233-235). On a desktop the "After the merge" text, which is the point of the card, is squeezed into 260px next to a wide Today. A before/after comparison needs equal columns, or a plain stack. Do one of these: (a) put the two blocks in a stack (vertical) with the h3 headings, which works at 360px and on desktop, or (b) add an equal-width class named in docs/design/areas/<area>.md. Also: no phone or desktop look was captured, so the 360px check is unverified; capture both after the fix. Second, lines() emits one <p> per line, so a long direction is a long run of paragraphs with no list semantics. Render each part as a single block with white-space: pre-wrap using an existing class, or a list. The terminal is not affected: the direction view there is not touched by this change.

commented

I made both changes you asked for, but I still have no phone or desktop look, so the 360px check is unverified.

  • Comparison layout: "Today" and "After the merge" now sit in a plain stack, one above the other at every width. "After the merge" is no longer squeezed into 260px.
  • Line rendering: each part of the direction is now one block using the existing .commit-body class (pre-wrap, mono) instead of one <p> per line. That is the settings page's marked parts as well as the preview.
  • README: the line saying the cards sit side by side on a desktop is replaced with one saying they stack at every width.

tsc --noEmit, bun scripts/design-lint.ts and test/vision-land.test.ts pass (10 of 10).

Why no look: the shell has chromium but cannot sign in to a preview. The card needs a signed-in admin and a vision pull, so I could not capture it. The preview of this branch should be the place to take both widths.

Changes requested — before the latest push

The shape is right: one nextDirection shared by the merge and the preview, admin-only, open-pull-only, and a test that the merged direction equals the previewed one. It misses on three points.

  1. Both doors (fix first). The preview and the fenced/owner marking exist only as web pages. A person or agent using the terminal or MCP cannot see what a vision pull will write. src/http/mcp/tools/vision.ts already deals in the direction, so it is the natural place to return previewVision (today, after, or the reason it would stay) for a pull, gated on canAdmin exactly as the page is. Give it a test, and a line in the README. The terminal/TUI needs the same read, or the README must say plainly that it does not.
  1. The issue's own checkbox, looks at phone and desktop widths, is undone, and I could not check it either: the card needs a signed-in admin plus a vision pull, which the preview does not give me. The 360px claim (two stacked blocks of pre-wrap mono text in .commit-body) is unverified. Long unbroken lines in .commit-body risk horizontal overflow at 360px. Please capture the looks, or add overflow-wrap:anywhere through an existing token/class and say so.
  1. Design: .commit-body is the commit-message component, borrowed here for direction text, and the h3.small headings and data-direction-* hooks are hand-rolled. Name this use in docs/design/areas/<area>.md (not DESIGN.md) or use a named component.

Outside this pull's scope the direction asks for less, not more: it touches no frozen file, which is good.

commented

I've pushed fixes for points 1 and 3. The phone and desktop looks (point 2) are still not captured. tsc, design-lint, test/mcp* (394 pass) and the vision-land test pass.

  1. MCP door: the vision tool takes an optional number, and for someone who can administer the repository it now returns two new fields.

- preview is { today, after } for an open vision pull, or { why } when the direction would stay. It is null otherwise. - directionParts cuts the direction into { kind: "vision" | "owner", text }. It is null for people without admin rights. - preview uses the same previewVision as the page, so the two cannot differ. docs/MCP.md is regenerated, and a new test covers the owner and reader cases, including that after equals nextDirection. - The README now says the terminal (TUI) has no such view.

  1. Overflow: the text now uses its own .direction-text class with white-space: pre-wrap and overflow-wrap: anywhere, so a long unbroken line wraps at 360px instead of scrolling sideways.

- This is reasoned, not looked at. The shell cannot sign in to a preview as an admin with a vision pull, so I could not capture it. Please check the preview of this branch at 360px and on desktop.

  1. Design: .direction-text is named in docs/design/areas/direction.md, and .commit-body is no longer borrowed. The data-direction* attributes are documented there as test hooks; the h3.small headings are unchanged.
Approved

Approved. I read every changed line for security and design, and ran tsc --noEmit, bun scripts/design-lint.ts and bun test test/vision-land.test.ts test/mcp-vision.test.ts (14 pass) at head ef9ed973.

Security: clean.

  • The pull-page card and the MCP preview and directionParts are both gated on canAdmin with the forge's verified identity. A guest or reader gets nothing; the tests cover the reader case.
  • previewVision reads docs/VISION.md only at the pull's headOid in pullDir, so a fork head is read from its own directory.
  • Every direction part goes through the html template, so it is escaped.
  • The change adds no write path and no new input beyond an integer number, which is validated by both the schema and Number.isInteger.
  • There is no shell or SQL built from user text.

Correctness: one nextDirection feeds both the merge and the preview. The test checks that the merged direction equals what was shown byte for byte, and that the card goes away after the merge.

Design: .badge is used neutral and outline, so no second accent is added. .direction-text is named in docs/design/areas/direction.md, the blocks stack at every width, and nothing needs JavaScript.

Both doors: the MCP vision tool returns the same read. The TUI shows no direction anywhere today, and the README says so plainly.

Left open, not blocking:

  1. This pull edits docs/MCP.md, one of the files the direction freezes while there are more than 40 open pulls. The edit is forced by the MCP door the earlier review asked for, and it is one table row. Land it quickly so it does not sit and conflict.
  2. #5835's checkbox for looks at phone and desktop widths is still undone. The preview has no admin and no vision pull, so I could not verify the card at 360px either. Keep that box open on the issue until someone takes the looks.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs