Skip to content

feat(chatui): add tabbed workspace and PDF previews - #10022

Open
Soulter wants to merge 1 commit into
codex/chatui-settings-and-readingfrom
codex/chatui-workspace-preview
Open

feat(chatui): add tabbed workspace and PDF previews#10022
Soulter wants to merge 1 commit into
codex/chatui-settings-and-readingfrom
codex/chatui-workspace-preview

Conversation

@Soulter

@Soulter Soulter commented Sep 10, 2026

Copy link
Copy Markdown
Member

Workspace files currently use a single preview area and cannot display PDFs. This change adds a tabbed file workspace with an embedded PDF viewer, so users can browse files and read documents alongside their conversation.

Stacked on #10021. The base branch is codex/chatui-settings-and-reading; this PR contains only the workspace changes. Merge the parent PR first, then retarget this PR to master.

Modifications

  • Rename the workspace entry to Files, place previews to the left of the file tree, and add a tree visibility toggle and larger preview dialog.

  • Add closable file tabs with keyboard navigation. Single-clicking files reuses an italic temporary tab; interacting with its preview or double-clicking the file/tab keeps it open.

  • Add a lazily loaded PDF.js canvas viewer with continuous scrolling, nearby-page rendering, bounded canvas buffers, and floating zoom controls. Preserve reading position when resizing or switching to the larger preview.

  • Bundle the PDF worker and versioned character maps, fonts, WebAssembly, and color profiles locally for development and production.

  • Cancel obsolete PDF downloads and handle oversized files, password-protected documents, and rendering failures while keeping downloads available. PDF previews are limited to 50 MB.

  • Update Chinese, English, Japanese, and Russian labels. No backend routes or API schemas change.

  • This is NOT a breaking change.

Screenshots or Test Results

  • pnpm build passed, including Vue/TypeScript checking and production asset bundling.
  • ruff format ., ruff check ., and git diff --check passed.
  • Browser automation was not run; interaction testing is handled by the maintainer.

Checklist

  • The features were requested and iterated on with the maintainer.
  • Full interaction verification and screenshots are provided.
  • The new frontend dependency, pdfjs-dist, is recorded in dashboard/package.json and dashboard/pnpm-lock.yaml.
  • No malicious code is introduced.

Summary by Sourcery

Replace the single-file workspace preview with a tabbed Files experience that supports browsing code and reading PDFs within the chat interface.

New Features:

  • Add a tabbed Files workspace for browsing and previewing multiple project files alongside chat.
  • Add embedded PDF previews with continuous scrolling, lazy page rendering, zoom controls, and reading-position preservation.

Bug Fixes:

  • Handle cancelled or obsolete PDF loads and report oversized, password-protected, and failed PDF previews without removing download access.

Enhancements:

  • Improve workspace layout with resizable previews, tree visibility controls, larger preview dialogs, keyboard-navigable tabs, temporary file tabs, breadcrumbs, and code line numbers.

Build:

  • Add pdfjs-dist and bundle its worker and required runtime assets locally for development and production.

Chores:

  • Update workspace labels and PDF-related translations across English, Chinese, Japanese, and Russian locales.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @Soulter, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 7 hours and 5 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 10, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
astrbot-docs c62c408 Commit Preview URL

Branch Preview URL
Sep 10 2026, 09:34 AM

@Soulter
Soulter added this pull request to stack #10032 September 10, 2026 14:07
@Soulter
Soulter removed this pull request from stack #10032 September 10, 2026 14:48
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