Skip to content

fix(inbox): refetch missing highlighted comment#2907

Open
furtherref wants to merge 1 commit into
multica-ai:mainfrom
furtherref:codex/upstream-inbox-highlight-timeline-refresh
Open

fix(inbox): refetch missing highlighted comment#2907
furtherref wants to merge 1 commit into
multica-ai:mainfrom
furtherref:codex/upstream-inbox-highlight-timeline-refresh

Conversation

@furtherref
Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes an Inbox deep-link edge case where IssueDetail can reopen an issue with a timeline query that is still considered fresh, but the cached timeline does not contain the highlightCommentId target yet. In that state, the existing scroll/highlight effect has no DOM node to land on.

This keeps the recovery scoped to the highlighted-comment path: after the issue and timeline finish loading, if the loaded timeline is missing the target comment, IssueDetail invalidates that issue timeline once so TanStack Query fetches the authoritative timeline and the existing scroll/highlight behavior can proceed.

Related Issue

No exact upstream issue found. Related prior deep-link work: #2332 and #2472.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Refactor / code improvement (no behavior change)
  • Documentation update
  • Tests (adding or improving test coverage)
  • CI / infrastructure

Changes Made

  • packages/views/issues/components/issue-detail.tsx: detect a missing highlighted comment in a loaded timeline and invalidate that issue timeline once per issue/comment pair.
  • packages/views/issues/components/issue-detail.test.tsx: seed a fresh but incomplete timeline cache and assert that the target comment is refetched, rendered, and scrolled into view.

How to Test

  1. pnpm --filter @multica/views exec vitest run issues/components/issue-detail.test.tsx -t "highlightCommentId scroll-to-comment"
  2. pnpm --filter @multica/views exec vitest run issues/components/issue-detail.test.tsx
  3. pnpm --filter @multica/views typecheck
  4. git diff --check -- packages/views/issues/components/issue-detail.tsx packages/views/issues/components/issue-detail.test.tsx
  5. Pre-push hook: pnpm lint, pnpm typecheck, pnpm test, and pnpm build

Checklist

  • I have included a thinking path that traces from project context to this change
  • I have run tests locally and they pass
  • I have added or updated tests where applicable
  • If this change affects the UI, I have included before/after screenshots
  • I have updated relevant documentation to reflect my changes
  • If I added a new runtime / coding tool / UI tab, I synced the change to landing copy (apps/web/features/landing/i18n/) and relevant docs (apps/docs/content/docs/)
  • If this PR touches Chinese product copy, I checked it against apps/docs/content/docs/developers/conventions.zh.mdx (terminology, mixed-rule for task / issue / skill)
  • I have considered and documented any risks above
  • I will address all reviewer comments before requesting merge

AI Disclosure

AI tool used: Codex

Prompt / approach: Ported the downstream FurtherRef fix for furtherref/multica#57 onto the latest upstream main, reviewed the patch against the current upstream issue-detail flow, checked for an existing upstream fix/open PR, and ran targeted plus full pre-push verification.

Screenshots (optional)

N/A — cache recovery path covered by regression test.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

@furtherref is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

@furtherref furtherref marked this pull request as ready for review May 20, 2026 04:17
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