Repository navigation
Questions: a little more context, and links to attached files open beside the thread - #1829
Merged
Merged
Conversation
…side the thread Guidance (one source: QUESTION_AUTHORING_GUIDE, pasted into the plannotator skill, riding send_message's MCP description and `plannotator inbox --help`): never a bare question; the reviewer switches in cold and works at a higher level, so say what the choice affects, what you know or tried and why you recommend it, in one to three short sentences, plain words, no jargon or internal names; a screenshot for anything visual; link a file that shows it better, attached in the Inbox. The guide's example now models the rule. The install prompt and the help's Inbox section say the same in one line each. Inbox window: a markdown or raw-HTML link in an agent message to one of that message's attachments opens it in the side pane (focus moves into it), matched client-side against the attachment records (packages/inbox/links.ts). Any other local link renders as inert text titled "Not attached to this message", with no href, so nothing is fetched. http(s) links are unchanged. The seam is Viewer's optional resolveLocalLink (LocalLinkContext); plan review, annotate and other hosts pass none and render as before.
…ing, link hrefs - InlineMarkdown drops `cursor-help` (it leaked into the pinned guides.show stylesheet); the Inbox sets the help cursor in inbox.css. - packages/inbox/links.test.tsx joins the CI DOM test list. - The PFM reminder's question example carries a context line, and the reminder says: never a bare question; one to three plain sentences on what it affects and why you recommend it; a screenshot if visual. - Guide: "the reviewer switches in cold, thinks at the level of the product, and does not know what you know." The lead and a few rules are shorter, so Claude Code's 2,048 cut of send_message's description now keeps the whole `- [x]` rule (pinned in inbox.test.ts). Skill pasted again. - An `open` link resolution may carry an href. In the Inbox it is the window's deep link (`#thread=<id>&file=<att id>`), so a new tab, drag or copy opens the same file; a Cmd/Ctrl/Shift or middle click goes there. - The attached link's tooltip names the file's path in the project.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
1. Questions carry context. The owner, answering an agent's questions: "Put context in these damn questions, please." The rules now say it literally, in every instruction set we give agents, from one source:
QUESTION_AUTHORING_GUIDE(packages/core/question-block.ts), pasted byte for byte into theplannotatorskill's "Asking the reviewer questions" section, ridingsend_message's MCP description and printed verbatim byplannotator inbox --help.) for anything visual. Link a file that shows it better ([the mock](mock.html)); in the Inbox, attach it too, and the link opens it beside the thread.send_message's description now keeps every context rule and the whole- [x]rule (pinned ininbox.test.ts). The PFM reminder's example and rule say the same.inbox --help's Inbox example now has a context line that links an attached file. The section adds one line about attaching and linking, and says that a link to a file you did not attach shows as "Not attached".attachmentsdescription say that a link opens the file.2. In the Inbox, a link to an attached file opens it beside the thread.
packages/inbox/links.ts), against the attachment records the thread already has: the realpath ornamed_path, relative to the message'sbase_pathand then the project root, as message images resolve.?queryand#fragmentare ignored, and a percent-encoded path also matches. A bare file name matches only when exactly one attachment has that name.<a>loses itshref.#thread=<thread id>&file=<attachment id>, so "Open in new tab", a Cmd/Ctrl/Shift or middle click, drag and copy open the same file.Viewer'sresolveLocalLinklets anopenresolution carry thathref.Viewer's new optionalresolveLocalLink(packages/ui/components/LocalLinkContext.tsx, documented inpackages/ui/HANDOFF.mdandREADME.md). Plan review, annotate and other hosts pass nothing and render exactly as before; a DOM test pins this.Tests
apps/hook/server/plannotator-skill-reference.test.ts: the skill section equals the guide.packages/server/inbox.test.ts: the 2,048-character cut keeps "without opening anything else", "no jargon", the image and link syntax, and the closing "Ask only" rule. 21 pass.apps/hook/server/inbox-help.test.ts: the Inbox example parses with the store's parser, and its context carries the linked file.apps/marketing/inbox-launch.test.ts: the prompt is ASCII and its other checks pass.packages/inbox/links.test.tsx:named_path, a bare name, percent-encoding and Windows paths. These do not match: another file, another folder,../../../etc/passwd, and a bare name that two attachments share.DOM_TESTS=1): an attached link (markdown and raw HTML) opens the pane; its href is the deep link and its tooltip the project path; a Ctrl click is left to the browser. An unattached link is an inert span with no href and nothing fetched. An external link keepstarget=_blankandrel=noopener noreferrer. AViewerwithout the seam is unchanged.tests/e2e/inbox-message-links.spec.ts, Playwright against the compiled binary: click and Enter open the pane, the deep-link href opens the file in a new tab, focus moves into the pane, the unattached link is never requested, and the external link is unchanged. The fulltest:e2e:inboxrun: 87 pass, 1 skipped.bun run typecheckpasses.DOM suites for
packages/ui,packages/inboxandpackages/editor: 2,608 pass. In the full run, 4DocBadgestests fail; they pass when run alone and this PR does not touch them.bun run --cwd apps/guides-show check:manifest: in sync.scripts/dom-test-allowlist.test.tsandpackages/shared/pfm-reminder.test.tspass. After the review fixes,inbox-message-links,inbox-message-images,inbox-attachmentsandinbox.specpass against a rebuilt binary (25 pass).