[PR #1856] fix(staffml): mount the command palette and shortcuts overlay #25036

Open
opened 2026-06-13 06:01:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1856
Author: @farhan523
Created: 6/12/2026
Status: 🔄 Open

Base: devHead: fix/staffml-mount-command-palette


📝 Commits (1)

  • 06b6679 fix(staffml): mount the command palette and shortcuts overlay

📊 Changes

2 files changed (+64 additions, -0 deletions)

View changed files

📝 interviews/staffml/src/app/layout.tsx (+8 -0)
interviews/staffml/tests/command-palette.spec.ts (+56 -0)

📄 Description

Problem

CommandPalette and KeyboardShortcutsOverlay were added in the client-UX overhaul (cefa8bfe63) — complete with unit tests and docblocks stating they are "mounted in app/layout.tsx" — but the mount line was never actually added. git log -S CommandPalette -- src/app/layout.tsx returns nothing: they have been dead since introduction.

As a result, on every route:

  • the navbar search icon dispatches staffml:open-palette into the void (no listener mounted),
  • Cmd/Ctrl+K does nothing,
  • ? does nothing.

Fix

Render both overlays once in RootLayout, inside <Providers> so the palette can read the vault via useVault() (it would throw outside CorpusProvider).

Test

Adds a Playwright smoke test (tests/command-palette.spec.ts) covering the three previously-dead entry points: Ctrl+K, the navbar search icon, and ?. tsc --noEmit is clean.

How to verify

  1. npm run dev, open any page.
  2. Click the navbar search icon or press Ctrl/Cmd+K → palette opens.
  3. Press ? → keyboard-shortcuts overlay opens. Esc closes either.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1856 **Author:** [@farhan523](https://github.com/farhan523) **Created:** 6/12/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/staffml-mount-command-palette` --- ### 📝 Commits (1) - [`06b6679`](https://github.com/harvard-edge/cs249r_book/commit/06b667937d4a5a097208902939b566444734daee) fix(staffml): mount the command palette and shortcuts overlay ### 📊 Changes **2 files changed** (+64 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `interviews/staffml/src/app/layout.tsx` (+8 -0) ➕ `interviews/staffml/tests/command-palette.spec.ts` (+56 -0) </details> ### 📄 Description ## Problem `CommandPalette` and `KeyboardShortcutsOverlay` were added in the client-UX overhaul (`cefa8bfe63`) — complete with unit tests and docblocks stating they are *"mounted in `app/layout.tsx`"* — but the mount line was never actually added. `git log -S CommandPalette -- src/app/layout.tsx` returns nothing: they have been dead since introduction. As a result, on **every** route: - the navbar search icon dispatches `staffml:open-palette` into the void (no listener mounted), - **Cmd/Ctrl+K** does nothing, - **`?`** does nothing. ## Fix Render both overlays once in `RootLayout`, inside `<Providers>` so the palette can read the vault via `useVault()` (it would throw outside `CorpusProvider`). ## Test Adds a Playwright smoke test (`tests/command-palette.spec.ts`) covering the three previously-dead entry points: Ctrl+K, the navbar search icon, and `?`. `tsc --noEmit` is clean. ## How to verify 1. `npm run dev`, open any page. 2. Click the navbar search icon **or** press **Ctrl/Cmd+K** → palette opens. 3. Press **`?`** → keyboard-shortcuts overlay opens. **Esc** closes either. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-13 06:01:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#25036