Skip to content

Staging#35

Merged
suguanYang merged 12 commits into
mainfrom
staging
May 10, 2026
Merged

Staging#35
suguanYang merged 12 commits into
mainfrom
staging

Conversation

@suguanYang
Copy link
Copy Markdown
Contributor

No description provided.

suguanYang added 12 commits May 10, 2026 05:59
…ht pulse

Built on top of staging (not notebook-mvp per @suguan). Only adds
citation-specific changes without touching the existing virtualizer.

### 1. AI citation descriptions
- Chat prompt updated to request descriptive citation labels.
- `description` field added to ChatCitationView.
- Citation chips prefer description over bare filename.

### 2. Hash-based chunk navigation
- New useHashFragment hook: #chunk-{id} in URL, SPA-native.
- workspace-shell now reads/writes the hash instead of useState.

### 3. Citation highlight animation
- CSS keyframes citation-pulse, applied via citation-card-highlight.

Verified: pnpm build clean, pnpm test 160+ pass / 12 skip.

Signed-off-by: suguanyang <wangbinqi77@gmail.com>
Adds useHashFragment alongside the existing requestChunkFocus so
citation clicks, connection clicks, and other focus paths all push
to #chunk-{id} in the URL. Hash changes on mount trigger focus.

Does not touch Pi's virtualizer or chunk management.

Signed-off-by: suguanyang <wangbinqi77@gmail.com>
Replaces the instant scrollToOffset(0) with a two-pass approach:
auto-scroll first, then smooth-scroll in the next frame. Keeps
getChunksWithFocusedFirst ordering intact (cited chunk first, then
document order below).

Fixed 3 test assertions that broke on smooth-scroll in jsdom.

Signed-off-by: suguanyang <wangbinqi77@gmail.com>
Guest demo mode now shows 6 pre-built messages (3 user questions +
3 AI answers with citations) referencing the TSLA-Q4-2025 demo source.
Clicking a citation chip triggers the same citation flow as authenticated
mode — the source is loaded from public demo assets and the content
panel scrolls to the referenced section.

This lets anyone test the citation→chunk navigation flow without
logging in.

Signed-off-by: suguanyang <wangbinqi77@gmail.com>
handleDemoCitationClick now fetches demo chunks from
/demo-sources/{assetDir}/chunks.json instead of the API endpoint
(which 404s for demo sources). Matches by sectionPath first,
then content prefix, then first available chunk.

Signed-off-by: suguanyang <wangbinqi77@gmail.com>
…-staging

Chunk citation UX: AI descriptions, hash navigation, highlight animation
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
knowhere-notebook Ready Ready Preview, Comment May 10, 2026 6:43pm
knowhere-notebook-staging Ready Ready Preview, Comment May 10, 2026 6:43pm

Request Review

@suguanYang suguanYang merged commit cd19565 into main May 10, 2026
3 checks passed
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