Skip to content

Highlight deep-linked thread replies#1699

Open
AaronGoldsmith wants to merge 1 commit into
block:mainfrom
AaronGoldsmith:fix/thread-deeplink-highlight
Open

Highlight deep-linked thread replies#1699
AaronGoldsmith wants to merge 1 commit into
block:mainfrom
AaronGoldsmith:fix/thread-deeplink-highlight

Conversation

@AaronGoldsmith

@AaronGoldsmith AaronGoldsmith commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

  • Highlight a deeplinked reply inside the thread panel using Buzz's existing transient route-target treatment.
  • Keep route highlighting separate from ordinary thread scrolling, so expanding a reply branch or scrolling to a newly sent nested reply does not pulse the target.
  • Preserve the existing anchored-scroll lifecycle: center the deeplinked reply, highlight it for two seconds, then clear the target.
  • Cover a nested reply end to end: verify sending it does not highlight it, then navigate directly to the same reply and verify it is visible and highlighted.

Why this matters

Opening the correct thread is only half of navigation for a human reader. In a long thread, the reader otherwise has to scan replies to infer which message the sender intended to call out. Agents can query an event ID directly; humans need an immediate visual cue connecting the link they clicked to the relevant reply.

Research

Slack opens the relevant thread, brings the linked reply into view, and temporarily focuses it with an outline. This PR keeps the same transient behavior but reuses Buzz's existing background-based route-target-highlight-fade treatment so top-level and threaded deeplinks remain visually consistent. Closer outline parity can be considered separately if reviewers prefer it.

Test Plan

  • Desktop unit suite: 2,270 passed
  • Targeted Biome check on all changed files
  • TypeScript typecheck
  • Production build (pnpm build)
  • Nested-reply Playwright smoke E2E: 4/4 consecutive runs passed after the final production build
  • E2E verifies the nested reply does not pulse after send and does pulse after direct deeplink navigation
  • Captured and visually inspected active and faded states

Screenshots

Nested reply — highlight active (immediately after deeplink navigation):

Deep-linked nested reply highlighted

Nested reply — highlight faded (after two seconds):

Deep-linked nested reply after highlight fades

Known local hook limitations

The commit/push hooks also invoke unrelated repository-wide checks that could not complete locally: Flutter/Dart are not installed, Docker is not running for integration services, and the existing desktop/src-tauri/src/managed_agents/readiness.rs exceeds the file-size limit by three lines. Relevant desktop validation above passed.

@AaronGoldsmith

Copy link
Copy Markdown
Contributor Author

Why this matters

For a human following a deeplink, opening the correct thread is only half of the navigation task. In a long thread, the reader still has to scan the replies to infer which specific message the sender intended to call out. Agents can query directly for an event ID, but humans need an immediate visual cue that connects the link they clicked to the relevant reply. Highlighting the target removes that ambiguity while keeping the surrounding thread context visible.

One visual-detail note from the Slack comparison: Slack focuses the linked reply with a temporary outline rather than changing the reply's background color. This PR currently reuses Buzz's existing background-based route-target treatment so top-level and threaded deeplinks remain consistent. We can switch to an outline or refine the treatment if reviewers prefer closer Slack parity.

Reuse the anchored-scroll target state so replies receive the same transient route highlight as top-level messages. Keep ordinary thread scroll targets unhighlighted and cover nested reply navigation with an end-to-end regression test.

Co-authored-by: Aaron Goldsmith <aarong@squareup.com>
Signed-off-by: Aaron Goldsmith <aarong@squareup.com>
@AaronGoldsmith AaronGoldsmith force-pushed the fix/thread-deeplink-highlight branch from f5008ba to 9cdaf22 Compare July 10, 2026 01:01
@AaronGoldsmith

Copy link
Copy Markdown
Contributor Author

Adversarial review follow-up

Thanks to the independent review, I made the following refinements before team review:

  • Fixed unintended non-deeplink highlights. Thread scroll targets now carry explicit highlight intent. Expanding a collapsed reply branch and scrolling to a newly sent nested reply still scroll, but no longer inherit the route-target pulse.
  • Strengthened the E2E. The regression now creates a nested reply, confirms the post-send scroll does not highlight it, then deep-links to that same reply and confirms it is brought into view and receives route-target-highlight-fade. This also exercises ancestor expansion for a nested target.
  • Checked timing stability. The final nested-reply E2E passed 4/4 consecutive runs after a fresh production build. The assertion still observes the user-visible animation because that is the behavior under test.
  • Corrected accountability trailers. The amended commit now contains Co-authored-by and Signed-off-by for Aaron Goldsmith <aarong@squareup.com>.

The optional visual observations remain unchanged: Buzz intentionally reuses its existing background pulse rather than Slack's outline, and the main timeline root can pulse alongside the targeted thread reply. Those are documented rather than expanded in this focused change.

@AaronGoldsmith AaronGoldsmith marked this pull request as ready for review July 10, 2026 01:08
@AaronGoldsmith AaronGoldsmith requested a review from a team as a code owner July 10, 2026 01:08
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.

1 participant