Skip to content

Improve source popup context and reading controls - #159

Open
ishan-jawale wants to merge 7 commits into
georgia-tech-db:mainfrom
ishan-jawale:source-preview-polish
Open

ishan-jawale wants to merge 7 commits into
georgia-tech-db:mainfrom
ishan-jawale:source-preview-polish

Conversation

@ishan-jawale

@ishan-jawale ishan-jawale commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Make the source popup easier to read while an answer is being generated. Students can see the original question, keep a passage open when the answer arrives, and return to the cited passage or PDF page without losing their place.

Key changes

  • Add a shared source header with section and document titles, an expandable question, collapsible source details, and Keep open and Return to chat controls.
  • Show the correct question and generation status when reopening sources, navigating between documents, simplifying earlier answers, or retrying with reasoning.
  • Preserve the mounted reader, scroll position, and PDF keyboard focus when retained; reject late document loads after dismissal, cancellation, or completion.
  • Add Jump to passage and Back to cited page controls, distinguish PDF search matches from page navigation, and support both themes and narrow layouts.
  • Update popup lifecycle tests, source-reader browser checks, the manual preview fixture, and test instructions for current main.

Main implementation: App.tsx, MarkdownSourceViewer.tsx, SourceViewerHeader.tsx, answer-source-preview.ts, hooks/useAnswerSourcePreview.ts, and source-viewer.css.

Testing

  • npm run build passed, including Node and renderer TypeScript checks and all application bundles.
  • npm run test:unit:ts: 370 passed.
  • npm run test:unit:python: 115 passed.
  • npm run test:integration: 16/16 conversation pipeline contracts and Python worker/PDF integration passed.
  • All 12 browser suites passed, covering source preview, query plans, sidebar, study workspace, practice, scrolling, source access, model selection, and cloud connections.
  • 14 additional source scenarios passed: delayed loads, Stop, failures, Settings navigation, mixed Markdown/PDF navigation, destination failure, dismissal during loading, and phone layouts.
  • git diff --check upstream/main...HEAD passed.
  • For the wording-only follow-up, both TypeScript checks and all 21 targeted source-reader tests passed. A compiled-output comparison confirmed that the changes preserve the logic.

Notes

  • Integrated upstream main at c7fa02f and resolved conflicts in the main screen and test documentation while preserving the shared sidebar and query-plan behavior.

Screenshot

Source reader showing the original question and highlighted BuzzDB passage.

source-reader-from-presentation

Ishan Jawale and others added 7 commits October 20, 2026 15:22
Keep the original question visible in PDF and Markdown readers, with section metadata, passage navigation, and optional retention when answers arrive.

Preserve request ownership across reopened readers and maintain PDF keyboard focus through answer and follow-up completion. Add unit and browser regression coverage for the reader lifecycle.
Preserve reader question context and retention controls alongside the shared sidebar and query plans. Update source-preview fixtures and browser checks for the current search/document bridge and Chat return action.
Updated instructions for using the source reader and automated checks.
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