Skip to content

feat(issue-detail): add jump controls#2992

Open
get6 wants to merge 1 commit into
multica-ai:mainfrom
get6:feat/issue-2726-scroll-jump
Open

feat(issue-detail): add jump controls#2992
get6 wants to merge 1 commit into
multica-ai:mainfrom
get6:feat/issue-2726-scroll-jump

Conversation

@get6
Copy link
Copy Markdown

@get6 get6 commented May 21, 2026

What does this PR do?

Adds a one-click jump control to the issue detail page for long activity/comment threads. The control keeps the issue detail page document-shaped instead of changing react-virtuoso follow behavior: it only appears when the page is actually scrollable, shows a single contextual direction, and stays secondary to the global Chat FAB. Desktop and mobile demo videos are included below to show the final placement and interaction.

Thinking path: issue detail currently has a custom scrollContainerEl for the timeline/document area, while Chat FAB already owns the primary bottom-right action. A small contextual control above that FAB solves the long-thread navigation pain without introducing competing primary actions or auto-scroll behavior that would make issue detail feel like chat.

Related Issue

Closes #2726

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)
  • Tests (adding or improving test coverage)
  • Documentation update
  • CI / infrastructure

Changes Made

  • packages/views/issues/components/issue-detail.tsx
    • Adds scrollability / near-bottom tracking for the issue detail scroll container.
    • Renders one floating jump button for long threads only.
    • Shows / “Jump to latest activity” when not near the bottom.
    • Shows / “Jump to top” when near the bottom.
    • Hides the control while the chat window is open.
  • packages/views/issues/components/issue-detail.test.tsx
    • Adds coverage for the contextual jump direction and scroll target.
    • Adds coverage for hiding the control when chat is open.
  • packages/views/locales/en/issues.json
    • Adds English labels for the jump control.
  • packages/views/locales/zh-Hans/issues.json
    • Adds zh-Hans labels for the jump control.

How to Test

  1. Run pnpm --filter @multica/views exec vitest run issues/components/issue-detail.test.tsx.
  2. Run pnpm --filter @multica/views typecheck.
  3. Run pnpm --filter @multica/views lint.
  4. Manual UI check: open a long issue thread, verify the button appears above the Chat FAB, jumps down from the top/middle, switches to jump up near the bottom, and disappears when the chat window is open. See the desktop/mobile videos below for the expected interaction.

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/videos
  • 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

Risk: low-to-moderate UI risk. The control is scoped to issue detail, uses the existing scroll container, and avoids changing virtualized timeline follow behavior. Main risk is visual overlap on small screens; it is positioned above the existing Chat FAB and hidden when chat is open. The attached desktop/mobile videos cover the expected placement and interaction.

Docs: no product docs update needed; this is a small issue-detail affordance rather than a documented feature surface.

Screenshots/videos: desktop and mobile demos are included below.

AI Disclosure

AI tool used: Multica Agent / Hermes

Prompt / approach:
Implemented from the linked feature issue and live product context: preserve issue detail as a document-shaped page, avoid Chat FAB conflict, add one contextual jump control, and validate with targeted unit tests plus typecheck/lint.

Screenshots (optional)

Desktop

Desktop demo

Download desktop video

Mobile

Mobile demo

Download mobile video

Copilot AI review requested due to automatic review settings May 21, 2026 07:11
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

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

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a floating “jump” control to the Issue Detail timeline to help users quickly navigate long activity threads, including i18n strings and regression tests.

Changes:

  • Introduces a single floating jump button that toggles between “jump to latest activity” and “jump to top” based on scroll position, and hides while chat is open.
  • Adds English and zh-Hans locale strings for the jump control labels.
  • Adds regression tests covering the jump control behavior and chat-open hidden state.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/views/locales/zh-Hans/issues.json Adds zh-Hans labels for jump-to-top / jump-to-latest.
packages/views/locales/en/issues.json Adds English labels for jump-to-top / jump-to-latest.
packages/views/issues/components/issue-detail.tsx Implements scroll-state tracking and renders the floating jump control.
packages/views/issues/components/issue-detail.test.tsx Adds tests validating jump control behavior and chat-open hiding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1047 to +1048
scrollContainerEl.scrollTo({
top: isNearScrollBottom ? 0 : scrollContainerEl.scrollHeight,
Comment thread packages/views/issues/components/issue-detail.tsx
@get6 get6 changed the title feat: add jump controls for long issue threads feat: add issue detail jump controls May 21, 2026
@get6 get6 changed the title feat: add issue detail jump controls feat(issue-detail): add jump controls May 21, 2026
@get6
Copy link
Copy Markdown
Author

get6 commented May 21, 2026

Addressed the Copilot review feedback in 5ebe1e9:

  • Explicitly scroll to scrollHeight - clientHeight instead of relying on browser clamping.
  • Throttle scroll-state recalculation with requestAnimationFrame.
  • Avoid redundant React state updates when the computed booleans have not changed.
  • Updated the jump-control test expectation for the explicit max scroll target.

Validation:

  • pnpm --filter @multica/views exec vitest run issues/components/issue-detail.test.tsx
  • pnpm --filter @multica/views typecheck
  • pnpm --filter @multica/views lint (passes with pre-existing warnings)

@get6 get6 force-pushed the feat/issue-2726-scroll-jump branch from 5ebe1e9 to 7c559a8 Compare May 21, 2026 08:28
@get6
Copy link
Copy Markdown
Author

get6 commented May 21, 2026

Adjusted the jump control placement after local UX feedback: the floating button now sits higher above the bottom composer area instead of hugging the lower edge. Verified with issue-detail tests and typecheck.

@get6
Copy link
Copy Markdown
Author

get6 commented May 21, 2026

Updated the jump control positioning based on UX feedback: it now uses viewport-level positioning () like the AI chat FAB instead of being anchored inside the issue content panel, and stacks just above the chat button. Verified issue-detail tests and typecheck.

@get6
Copy link
Copy Markdown
Author

get6 commented May 21, 2026

Correction/clarification: the jump control now uses viewport-level positioning (fixed right-2) like the AI chat FAB instead of being anchored inside the issue content panel, and stacks just above the chat button. Verified issue-detail tests and typecheck.

@get6
Copy link
Copy Markdown
Author

get6 commented May 21, 2026

Fine-tuned the jump button relative to the AI chat FAB: kept the vertical stack, and shifted the smaller jump button to right-2.5 so its center aligns with the chat button center (chat FAB is size-10/right-2; jump is size-9/right-2.5). Verified issue-detail tests and typecheck.

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.

[Feature]: Issue detail: add one-click jump to top / bottom for long comment threads

2 participants