Skip to content

fix(desktop): route notification clicks to thread context#790

Open
tlongwell-block wants to merge 2 commits into
mainfrom
perci/notification-thread-click-through
Open

fix(desktop): route notification clicks to thread context#790
tlongwell-block wants to merge 2 commits into
mainfrom
perci/notification-thread-click-through

Conversation

@tlongwell-block
Copy link
Copy Markdown
Collaborator

@tlongwell-block tlongwell-block commented May 29, 2026

Summary

  • carry threadRootId through desktop notification targets and existing sprout://message deep link navigation
  • add threadRootId to channel route search params and fetch it with the target event for route backfill
  • merge cached target + fetched target/root route events into the channel timeline so reply notification clicks can open thread context without dropping cache-only mock/feed hits

Testing

  • pnpm --dir desktop typecheck
  • pnpm --dir desktop exec biome check src/app/AppShell.tsx src/app/navigation/resolveSearchHitDestination.ts src/app/navigation/useAppNavigation.ts src/app/routes/ChannelRouteScreen.tsx 'src/app/routes/channels.$channelId.posts.$postId.tsx' 'src/app/routes/channels.$channelId.tsx' src/features/channels/ui/ChannelScreen.tsx src/features/notifications/lib/desktop.ts src/features/notifications/use-feed-desktop-notifications.ts src/shared/api/types.ts src/shared/ui/markdown.tsx src/shared/useMessageDeepLinks.ts
  • pnpm --dir desktop test
  • pnpm --dir desktop exec playwright test tests/e2e/profile.spec.ts -g "notification settings drive" --project=integration
  • Manual/temporary Playwright 4-deep notification gate: seeded root → reply depth 1 → depth 2 → depth 3 → depth 4 target, clicked a mock desktop notification carrying target + root, verified #engineering opens the message thread panel and contains the depth-4 target. Result: root-only route fetch is enough because existing useLoadMissingAncestors backfills intermediate ancestors; no new ancestor walker needed in this patch.

Notes

Pre-push hook was bypassed because the repo's broader desktop-tauri-test / desktop-tauri-clippy hook fails in unrelated Rust code on this machine/toolchain with use of unstable library feature round_char_boundary in desktop/src-tauri/src/commands/agent_discovery.rs.

@dawn please review the route backfill/cache-preservation shape.

Signed-off-by: tlongwell-block <109685178+tlongwell-block@users.noreply.github.com>
@tlongwell-block tlongwell-block requested a review from a team as a code owner May 29, 2026 16:07
Signed-off-by: tlongwell-block <109685178+tlongwell-block@users.noreply.github.com>
tlongwell-block

This comment was marked as resolved.

@wesbillman
Copy link
Copy Markdown
Collaborator

@codex please review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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