Skip to content

Include session title in handoff prompt - #747

Draft
baron wants to merge 1 commit into
mainfrom
wt/handoff-session-title-current-main-20260808
Draft

Include session title in handoff prompt#747
baron wants to merge 1 commit into
mainfrom
wt/handoff-session-title-current-main-20260808

Conversation

@baron

@baron baron commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • include the compose-tab session title in the human-facing Agent Mode handoff snippet
  • escape title newlines, quotes, backslashes, and control characters onto one line
  • preserve existing MCP/CLI restoration identifiers and commands

Validation

  • make dev-lint — passed on the byte-identical current-main feature tree
  • make dev-test FILTER=AgentChatTitlebarSafetyTests — previously passed with 14 tests / 0 failures before the latest main refresh
  • latest-main rerun is blocked by an inherited compile error in AgentTranscriptServices.swift (refreshSignatureLock / lastRefreshInputSignatureByTabID missing); that file is byte-identical to origin/main and outside this two-file PR diff
  • commit and push preflights, guardrails, whitespace checks, and redacted secret scans passed

Diff scope

  • Sources/RepoPrompt/Features/AgentMode/Views/Titlebar/AgentChatOptionsMenuPresenter.swift
  • Tests/RepoPromptTests/App/AgentChatTitlebarSafetyTests.swift

@baron

baron commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

Code-level approval on exact head fcd9d7434591230bf1ef718f7fa9778bbfd4ea68: sourcing the title from target.tabName and rendering it with String(reflecting:) is a small, safe way to include the session title without multiline/quote injection, and the focused tests cover the contract.

Keep this draft until it is refreshed onto current main and required checks are green. The historical compiler failures were inherited from its old base, so they are not a code-review blocker, but they also do not prove the current integration. As the PR author, I cannot self-approve formally.

morluto commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Audit disposition — small merge candidate after refresh (2026-08-14)

Using String(reflecting:) for the human-facing title safely keeps newlines, quotes, backslashes, and control characters on one quoted line while leaving the restoration identifiers unchanged. The focused test covers the relevant injection boundary.

Please rebase onto current main, rerun AgentChatTitlebarSafetyTests, and obtain exact-head CI/non-author review. I did not find a code-level blocker in this two-file change.

morluto commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Deep-review assessment — 2026-08-14

Disposition: good narrow candidate; refresh and mark ready after checks. Sourcing the title from the captured target and rendering it with String(reflecting:) gives a quoted, single-line-safe representation for newlines, quotes, backslashes, and control characters while leaving restoration IDs and commands unchanged. I did not find a code-level blocker.

Please rebase onto current main, rerun AgentChatTitlebarSafetyTests on the final head, and verify empty and very long titles remain readable without altering the machine-relevant handoff fields. A non-author exact-head review should be sufficient after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants