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

Tell from any forge page: the palette's "Tell the crew" opens a composer in place, and the tell carries the page it was told from #999

Closed opened this
Closed without merging

The palette's "Tell the crew" now opens a composer in place on any repository page, and the tell records the page it was sent from. The new tests pass, but the type check did not run and I haven't looked at the composer in a browser.

Notes

stopped closed without shipping deploy c94cd03

opened this

The palette's "Tell the crew" now opens a composer in place on any repository page, and the tell records the page it was sent from. The new tests pass, but the type check did not run and I haven't looked at the composer in a browser.

What changed

  • Palette: "Tell the crew" is offered on every repository page, not just apps, and only to people who may direct the crew (mayDirectCrew). A reader gets no entry. src/contract/can.ts is the per-app permissions table and doesn't gate this, so I left it alone.
  • Composer: picking the entry swaps the palette list for a textarea and Send. It posts to the repository's existing POST /:owner/:name/tell, the same action the app page uses, and the same-origin check applies.
  • Receipt: it appears as one line in a reserved row, with a "See the tell" link (src/web/client.ts, src/web/style/components.ts). The composer fills the list's fixed height, so nothing shifts.
  • Without JavaScript: the entry is a link. On an app it goes to <app>?from=<path>#tell, where the existing tell form carries the page in a hidden from field. On a non-app repository it goes to /issues/new, which does not use from, so the page is not recorded there.
  • from: tell() in src/actions/tell.ts appends one Told from: <path> line to the body. toldFromPath keeps only a path on this forge and drops anything else, such as a full URL, //host, a backslash, whitespace, a control character or an over-long value. A dropped from doesn't stop the tell going through.
  • MCP: the tell tool accepts the same optional from.
  • JSON reply: tellFrom in src/web/studio/actions.ts now answers JSON, with the tell's page and number, when the caller asks for it. The home composer's POST /tell shares that function, so it also returns JSON to a caller that asks.
  • Redundant entry points: none. The app page's form and the home composer are different doors that now share the same action, so I deleted nothing.

Tests

  • test/tell-from.test.ts covers path validation, the palette row carrying from, a posted tell ending in the line, a cross-origin from being dropped, a cross-origin POST getting 403, the MCP from, and a reader seeing no entry.
  • I updated the expected no-script link in test/studio-words.test.ts.
  • I ran the new test file plus the studio, MCP, web, crew-direction and home-feed suites. In that combined run, 268 passed and 3 failed (two timeouts around git seeding and one error from the same setup). The terminal tests in test/studio.test.ts pass on their own with my change, so I put those down to load. I did not re-run the owner's-page test on its own.
  • tsc couldn't run here because the sandbox has no bun type definitions.

Left out

  • No screenshots of the diff page on a phone and a desk. I couldn't take them here, so someone should check the composer's size on both.
  • No markdown links for the Told from: line; it's plain text.

To try: open any repository page, press Cmd/Ctrl-K, pick "Tell the crew", type, and press Send (or Cmd/Ctrl-Enter).

🤖 Generated with Claude Code

Closes #639

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs