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

The header's Talk link carries ?about= on a repository, issue or pull page the viewer actually sees #10635

opened this

Merged 25d 4h ago, live in production

The header's Talk entry (the g t button and the user-menu item) now links to /talk?about=owner/repo on a repository home and /talk?about=owner/repo%23N on an issue or pull page. Every other page, including every 404 and refusal, keeps bare /talk.

Notes

opened this

The header's Talk entry (the g t button and the user-menu item) now links to /talk?about=owner/repo on a repository home and /talk?about=owner/repo%23N on an issue or pull page. Every other page, including every 404 and refusal, keeps bare /talk.

tsc, scripts/gate.ts, design-lint, test/talk-page.test.ts and test/file-hold-form.test.ts pass, the latter unchanged. I also ran 25 other test files that touch the header or /talk, and they pass too. scripts/fast.ts said the diff was too broad to name tests, so I didn't run the full suite; the forge's check does that on this push. I didn't call keep_plan because that tool isn't available here.

  • How it works: PageOptions gains an optional about in src/web/layout.ts. Only the page that rendered the subject sets it: the repository home (including the empty-repo view) in src/web/pages/repo.ts, the issue page in src/web/studio/tell.ts, and the pull page in src/web/studio/change.ts. Nothing reads the URL path.
  • Tests: in test/talk-page.test.ts, an issue page's header links to /talk?about=alice/hdr-pub%23N, and a repository page links to /talk?about=alice/hdr-pub. /explore keeps bare /talk. A 404 under a private repository and one under a missing repository give the same Talk links.
  • Left alone: the two 404 headers are not byte-identical. The "+" menu's new-issue link echoes the asked path (/new/issue?from=…), so the test compares only the Talk entries. That echo predates this change.
  • Not done: the other pull sub-pages (the files view, for one) and the command palette's "Talk to the forge" entry still use bare /talk. The issue asked only for the repository, issue and pull pages.
  • Pre-push hook: it demanded a "Try:" commit, so there is an empty commit with that message.

To try it, open any issue as a signed-in user and check the comment icon in the topbar, or press g t. Talk opens "About owner/repo#N: title".

🤖 Generated with Claude Code

Closes #10495

commented

The header's Talk entry (the g t button and the user-menu item) now links to /talk?about=owner/repo on a repository home and /talk?about=owner/repo%23N on an issue or pull page. Every other page, including every 404 and refusal, keeps bare /talk.

tsc, scripts/gate.ts, design-lint, test/talk-page.test.ts and test/file-hold-form.test.ts pass, the latter unchanged. I also ran 25 other test files that touch the header or /talk, and they pass too. scripts/fast.ts said the diff was too broad to name tests, so I didn't run the full suite; the forge's check does that on this push. I didn't call keep_plan because that tool isn't available here.

  • How it works: PageOptions gains an optional about in src/web/layout.ts. Only the page that rendered the subject sets it: the repository home (including the empty-repo view) in src/web/pages/repo.ts, the issue page in src/web/studio/tell.ts, and the pull page in src/web/studio/change.ts. Nothing reads the URL path.
  • Tests: in test/talk-page.test.ts, an issue page's header links to /talk?about=alice/hdr-pub%23N, and a repository page links to /talk?about=alice/hdr-pub. /explore keeps bare /talk. A 404 under a private repository and one under a missing repository give the same Talk links.
  • Left alone: the two 404 headers are not byte-identical. The "+" menu's new-issue link echoes the asked path (/new/issue?from=…), so the test compares only the Talk entries. That echo predates this change.
  • Not done: the other pull sub-pages (the files view, for one) and the command palette's "Talk to the forge" entry still use bare /talk. The issue asked only for the repository, issue and pull pages.
  • Pre-push hook: it demanded a "Try:" commit, so there is an empty commit with that message.

To try it, open any issue as a signed-in user and check the comment icon in the topbar, or press g t. Talk opens "About owner/repo#N: title".

🤖 Generated with Claude Code

commented

I added the missing pull test in test/talk-page.test.ts, and the pull-page about line is now covered. The test opens a pull as a different viewer and expects /talk?about=alice/hdr-pull%23N in the topbar, next to the issue case. I deleted the about line in src/web/studio/change.ts and the new test failed. With the line restored, tsc and all 43 tests in that file pass.

I did not do juniper's two follow-ups, since they said "after that" and the issue didn't ask for either:

  • Pull sub-pages and palette: the files and checks views and the command palette's "Talk to the forge" entry still use bare /talk.
  • 404 header: the "+" menu's new-issue link still echoes the asked path, so the two 404 headers aren't byte-identical. The test compares only the Talk links.

I can take both as follow-ups if you want them.

🤖 Generated with Claude Code

Sign in to join this conversation.

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

Keyboard shortcuts

Docs