Skip to content

feat(ui): enhance document previews, tab controls, and search - #444

Merged
mssssss123 merged 6 commits into
OpenBMB:mainfrom
mssssss123:feat/lightoffice
Jul 23, 2026
Merged

feat(ui): enhance document previews, tab controls, and search#444
mssssss123 merged 6 commits into
OpenBMB:mainfrom
mssssss123:feat/lightoffice

Conversation

@mssssss123

Copy link
Copy Markdown
Collaborator

Summary

Improve the PilotDeck file workbench and search experience with unified document navigation, in-document search, safer tab management, and better Chinese input support.

What changed

Document previews

  • Add a unified toolbar for PDF and converted Office previews.
  • Add page and slide thumbnail navigation.
  • Show outline navigation for PDF and Word documents when an outline is available.
  • Support page jump, zoom, fit modes, rotation, refresh, fullscreen, and download.
  • Keep Excel navigation based on worksheet tabs.
  • Allow the existing code minimap to work independently of diff mode.

Document search

  • Add full-document search for PDF and converted Word/PowerPoint previews.
  • Highlight all visible matches while giving the active result a stronger visual state.
  • Support previous/next result navigation and automatic page positioning.
  • Preserve highlighting as lazily rendered pages become visible.

File tabs

  • Add tab context-menu actions:
    • Close
    • Close other tabs
    • Close tabs to the right
    • Close all tabs
  • Preserve unsaved-change confirmation for batch closing.
  • Keep the nearest available tab active after closing multiple tabs.

Chat search

  • Support Chinese IME composition without interrupting input.
  • Highlight all mounted matches and visually distinguish the active result.
  • Preserve highlights across virtualized message rendering.
  • Improve Enter, Shift+Enter, Escape, and previous/next navigation behavior.

Verification

  • Focused UI tests passed.
  • Changed-file ESLint passed.
  • Production UI build passed.
  • Manually verified chat search, document search, outline/thumbnail navigation, and active-result switching.
  • Verified the detached PilotDeck demo returns HTTP 200.

…w functionality

- Added `getPdfNavigationMode` utility to determine navigation type based on file extension.
- Introduced `PdfOutline` and `resolvePdfOutline` for handling PDF outlines and navigation.
- Enhanced `PdfDocumentPreview` component with navigation controls and improved rendering logic.
- Updated `CodeEditorBinaryFile` to support PDF navigation and expand/collapse functionality.
- Added unit tests for new PDF navigation features and outline resolution.
- Improved UI elements for better user experience in document previews.
- Added `findPdfSearchMatches` and `renderPdfSearchHighlights` functions for searching and highlighting text in PDF documents.
- Created unit tests for the search functions to ensure accurate match detection and rendering.
- Updated `PdfDocumentPreview` component to integrate search functionality, allowing for text highlighting and selection.
- Enhanced text handling in the PDF viewer to support search results and improve user interaction.
…tion

- Added `handleTabsClose` method to manage closing multiple tabs atomically and selecting the nearest remaining tab.
- Enhanced `EditorSidebar` and `CodeEditorTabBar` components to support closing all tabs with context menu options.
- Updated UI to include confirmation prompts for unsaved changes when closing tabs.
- Added unit tests to verify the new tab closing behavior and ensure proper state management.
- Localized new tab actions in English and Chinese for improved user experience.
…ed input handling

- Updated `ChatHistorySearchBar` to manage input state with draft queries and handle IME composition events.
- Implemented composition start and end handlers to preserve input during Chinese IME usage.
- Refactored keydown event handling to improve search navigation and escape functionality.
- Added unit tests for preserving IME composition in `MainAreaV2` to ensure correct behavior during search interactions.
- Updated search highlight styles for improved visibility and user experience.
- Refactored `highlightSearchMatches` to support multiple highlighted occurrences and distinguish the active match.
- Enhanced unit tests to verify correct highlighting behavior in chat history and PDF search components.
- Introduced new CSS variables for consistent highlight styling across different themes.
@mssssss123
mssssss123 requested a review from xhd0728 July 23, 2026 12:54
@mssssss123
mssssss123 merged commit 08527a9 into OpenBMB:main Jul 23, 2026
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.

2 participants