Skip to content

Conversation

@amondnet
Copy link
Contributor

@amondnet amondnet commented Dec 4, 2025

Summary

  • Refactor AppHeader with modular components (Logo, Center, Search)
  • Add header config schema (logo light/dark, title)
  • Implement search with Command Dialog and fuse.js fuzzy search
  • Add useContentSearch composable for state management
  • Install shadcn-vue components: Command, Dialog, Kbd
  • Add color mode switching in search dialog
  • Add ProseKbd component for markdown

Changes

  • Modified: packages/layer/app/components/app/AppHeader.vue - Refactored into modular structure
  • New: packages/layer/app/components/app/AppHeaderLogo.vue - Logo component with light/dark support
  • New: packages/layer/app/components/app/AppHeaderCenter.vue - Center slot for branding
  • New: packages/layer/app/components/app/AppHeaderSearch.vue - Search trigger button
  • New: packages/layer/app/components/app/AppSearch.vue - Main search dialog component
  • New: packages/layer/app/components/app/AppSearchButton.vue - Keyboard button in search results
  • New: packages/layer/app/composables/useContentSearch.ts - Search state management with fuse.js
  • New: packages/layer/app/components/ui/command/ - Command palette components
  • New: packages/layer/app/components/ui/dialog/ - Dialog primitives
  • New: packages/layer/app/components/ui/kbd/ - Keyboard key components
  • New: packages/layer/app/components/content/ProseKbd.vue - Markdown prose component
  • Modified: packages/layer/app/layouts/default.vue - Updated to use new header structure
  • Modified: packages/layer/app/layouts/docs.vue - Updated to use new header structure
  • Modified: packages/layer/app/app.config.ts - Added header schema
  • Modified: packages/layer/nuxt.config.ts - Added fuse.js dependency
  • Modified: packages/layer/nuxt.schema.ts - Added header configuration
  • Modified: packages/layer/package.json - Added dependencies (fuse.js, etc.)
  • Modified: bun.lock - Updated lock file

Test Plan

  • Components render without errors
  • Search dialog opens/closes correctly
  • Fuzzy search works with content
  • Keyboard navigation works
  • Dark/light mode switching works in search
  • Mobile responsive design
  • Keyboard shortcuts work (Cmd+K / Ctrl+K)

- Refactor AppHeader with modular components (Logo, Center, Search)
- Add header config schema (logo light/dark, title)
- Implement search with Command Dialog and fuse.js fuzzy search
- Add useContentSearch composable for state management
- Install shadcn-vue components: Command, Dialog, Kbd
- Add color mode switching in search dialog
- Add ProseKbd component for markdown
@gemini-code-assist
Copy link

Summary of Changes

Hello @amondnet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the application's navigation and user experience by adding a comprehensive search feature accessible directly from the header. It involves a substantial refactoring of the existing header component into a modular design, alongside the integration of a powerful fuzzy search mechanism and a command dialog interface. The changes also include new configuration options for header elements and the addition of several UI components to support the new features.

Highlights

  • Header Refactoring: The AppHeader component has been refactored into a more modular structure, separating concerns into AppHeaderLogo, AppHeaderCenter, and AppHeaderSearch components for better maintainability and flexibility.
  • Integrated Search Functionality: A new search feature has been implemented using a Command Dialog, powered by fuse.js for fuzzy searching across documentation content. This search dialog can be triggered via a button in the header or a keyboard shortcut (Cmd+K / Ctrl+K).
  • New Configuration Schema: A new configuration schema for the header has been introduced, allowing customization of the header title and logos (light/dark mode specific) directly through the application configuration.
  • Shadcn-Vue Component Integration: Several shadcn-vue components, including Command, Dialog, and Kbd, have been integrated to provide a rich and accessible user interface for the new search functionality and other UI elements.
  • Color Mode Switching in Search: The search dialog now includes options for switching between system, light, and dark color modes, enhancing user experience and accessibility.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 4, 2025

Deploying docs-please with  Cloudflare Pages  Cloudflare Pages

Latest commit: a4ec1e7
Status:🚫  Deploy failed.

View logs

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a powerful search functionality with a command dialog, significantly improving the user experience for navigating documentation. The refactoring of the AppHeader into modular components is well-executed and improves maintainability. The addition of fuse.js for fuzzy searching and the thoughtful implementation of keyboard shortcuts are excellent features. I've identified a few issues, including a typo in the Nuxt configuration that would break a component, and a potential hydration mismatch issue in the search button. I've provided suggestions to address these points. Overall, this is a great contribution.

- Add isDark computed for reactive color mode icon in header
- Fix ColorModeSwitch to sync with external color mode changes
- Use v-model for proper two-way binding with SwitchRoot
- Update app.config with docs github configuration
@amondnet amondnet self-assigned this Dec 4, 2025
- Fix MDC mapping typo: 'kdb' -> 'kbd'
- Add skip navigation link for accessibility (WCAG 2.4.1)
- Add aria-label to logo link for screen readers
- Simplify ColorModeSwitch with computed getter/setter
- Fix hydration mismatch by wrapping KbdGroup in ClientOnly (AppSearchButton.vue)
- Use link.to as v-for key instead of index (AppHeader.vue)
- Add isDoc property to SearchItem for robust icon selection (AppSearch.vue, useContentSearch.ts)
@sonarqubecloud
Copy link

@amondnet amondnet merged commit ac26c66 into main Dec 18, 2025
1 of 2 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