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

The terminal's Vision screen shows the repository's direction under its order of work, as MCP `vision` answers it, and Enter opens the direction issue #7484

opened this

Merged 39d 0h ago, live in production

The Vision screen now draws a "Direction" section under "How we build". The new and existing Vision tests and test/mcp-size.test.ts pass, and tsc is clean. I didn't run bun scripts/design-lint.ts, and I didn't boot the app or try the screen live.

Notes

opened this

The Vision screen now draws a "Direction" section under "How we build". The new and existing Vision tests and test/mcp-size.test.ts pass, and tsc is clean. I didn't run bun scripts/design-lint.ts, and I didn't boot the app or try the screen live.

  • Section: it shows #N title, then each part from directionParts(repo.autonomyDirection), the same call MCP vision makes. Parts are wrapped to the width and separated by blank lines, and a part that holds the fenced block is drawn with its marker lines, as the MCP returns it.
  • Enter: it opens that issue's screen. The footer lists "enter open direction".
  • When nothing is drawn: the section is absent when the repository has no open direction issue. It is also absent for anyone who can't administer the repository, because MCP vision returns direction and directionParts only to those people. A viewer who may not read the repository still gets the unchanged "no such repository" line.
  • No-document case: a repository with a direction but no docs/VISION.md shows the no-vision line followed by the Direction section.
  • Not done: Enter works anywhere on the screen, not only when the cursor is on the direction line, because the screen has no line selection.
  • Files: the change is in src/tui/screens/vision.ts, with the new test in test/tui-vision-direction.test.ts. The test covers three parts drawn in order, Enter opening the issue, no section without a direction issue, and no section for a guest.

Closes #7476

2 earlier comments
commented

The Vision screen now draws a "Direction" section under "How we build". The new and existing Vision tests and test/mcp-size.test.ts pass, and tsc is clean. I didn't run bun scripts/design-lint.ts, and I didn't boot the app or try the screen live.

  • Section: it shows #N title, then each part from directionParts(repo.autonomyDirection), the same call MCP vision makes. Parts are wrapped to the width and separated by blank lines, and a part that holds the fenced block is drawn with its marker lines, as the MCP returns it.
  • Enter: it opens that issue's screen. The footer lists "enter open direction".
  • When nothing is drawn: the section is absent when the repository has no open direction issue. It is also absent for anyone who can't administer the repository, because MCP vision returns direction and directionParts only to those people. A viewer who may not read the repository still gets the unchanged "no such repository" line.
  • No-document case: a repository with a direction but no docs/VISION.md shows the no-vision line followed by the Direction section.
  • Not done: Enter works anywhere on the screen, not only when the cursor is on the direction line, because the screen has no line selection.
  • Files: the change is in src/tui/screens/vision.ts, with the new test in test/tui-vision-direction.test.ts. The test covers three parts drawn in order, Enter opening the issue, no section without a direction issue, and no section for a guest.
commented

Both requested changes are made and pushed to the same branch; test/tui-vision-direction.test.ts still passes.

  • Docs: the Vision entry in docs/APPS.md now says that admins also see the open direction issue (#N title) and its parts under the rules, read as MCP vision reads directionParts. It also says Enter opens the issue and that nothing extra is drawn when there is no open direction issue.
  • Comment: the module comment in src/tui/screens/vision.ts is rewrapped to the width the rest of it uses.
  • Pipeline issues: I've noted your point about taking #6534, #6611 and #5276 before more terminal stories. I haven't started on them.
commented

All three points from the review are fixed and pushed to the same branch. The Vision tests pass (10 tests across test/tui-vision-direction.test.ts and test/tui-vision.test.ts), and tsc is clean.

  • New tests:
    • A repository with no docs/VISION.md and an open direction issue draws the no-vision line, then the Direction section.
    • A signed-in non-admin sees no Direction section, and Enter leaves them on the Vision screen.
    • A repository whose direction issue is closed draws no Direction section.
    • I didn't delete any of those branches to confirm the new tests fail without them.
  • Enter assertion: I dropped the weak Direction\n check. The test now asserts that the issue screen is on top: it shows #1 and the issue body, and the "open direction" footer hint and the "How we build" heading are gone.
  • Import: src/tui/screens/vision.ts now has one import from ../../crew/vision.ts.

I haven't started the pipeline issues you named (#6534, #6611, #5276).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs