Fix popup ViewHeader interactivity and leaf dropdown menus #106

Closed
opened 2026-05-27 08:19:03 +00:00 by steve · 0 comments
Owner

The remaining popup regression is isolated to popup leaf ViewHeader interactivity when the title bar is enabled. Recent popup ownership and overlay portal fixes landed, but the popup leaf header menu still does not open inside the popout window.

Problem

The popup leaf menu regression is now narrow and reproducible:

  • The popup model reaches the correct selected markdown leaf.
  • The popup ViewHeader renders and the trigger is visible.
  • Clicking the popup leaf menu trigger does not transition the trigger to aria-expanded="true".
  • No popup dropdown content appears, and no matching menu appears in the parent window.
  • The popup does not emit the stale-derived warning that previously accompanied overlay ownership bugs.

The current focused regression lives in packages/workspace/e2e/tab-drag-drop.spec.ts as popup leaf view menus render in the popup host without stale-derived errors.

Goal

Make popup leaf ViewHeader controls fully interactive so popup-local leaf menus open and render in the popup host document, matching the behavior already achieved for popup overflow menus and other popup-local overlays.

Scope

  • Popup ViewHeader menu trigger behavior when appearence.interface.showTabTitleBar is enabled.
  • Popup leaf dropdown rendering for the leaf header menu.
  • The popup mount / event-handling path if it is the owner of the broken interactivity.
  • Focused regression coverage for the popup leaf menu path.

Non-goals

  • Redesigning popouts to use a separate top-level App runtime.
  • Reopening already-landed overlay portal fixes that are working for popup overflow menus and hover previews.
  • Broad multi-window architecture changes unrelated to popup leaf header interactivity.

Acceptance Criteria

  • In a popup window with showTabTitleBar enabled, the leaf header menu trigger opens successfully.
  • The popup leaf dropdown content renders in the popup host document, not the parent window.
  • The popup leaf menu contains the expected items such as Split down.
  • The regression test in packages/workspace/e2e/tab-drag-drop.spec.ts passes without temporary diagnostics.
  • No Reading a derived belonging to a now-destroyed effect warning is emitted during the popup leaf menu flow.

Implementation Notes

  • Current strongest finding: the popup workspace model reaches the correct selected leaf, but the popup ViewHeader trigger never reaches aria-expanded=true.
  • That shifts suspicion away from menu-content portal routing and toward popup header interactivity, mount lifecycle, or event delegation.
  • Recent experiments touched ViewHeader, API menu wrappers, and the popup regression test, but none produced a working open transition.
  • The popup mount path currently snapshots parent Svelte contexts through getAllContexts() in popout-window-manager.svelte; this is a likely owner worth verifying.

Suggested Files or Specs To Inspect

  • packages/workspace/src/lib/components/view-header/view-header.svelte
  • packages/workspace/src/lib/components/sidebar/popout-window-manager.svelte
  • packages/workspace/src/lib/components/sidebar/popout-window-shell.svelte
  • packages/api/src/lib/hooks/mountComponent.svelte.ts
  • packages/workspace/e2e/tab-drag-drop.spec.ts
  • packages/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte
  • packages/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte
  • packages/workspace/spec.md
  • spec/src/20-packages/workspace/index.md

Validation Commands

  • pnpm --filter @lapis-notes/workspace test:e2e e2e/tab-drag-drop.spec.ts --project=chromium --grep "popup leaf view menus render in the popup host without stale-derived errors"
  • pnpm --filter @lapis-notes/workspace test:e2e e2e/tab-drag-drop.spec.ts --project=chromium --grep "popup tab menus and markdown link previews render in the popup host"
  • pnpm --filter @lapis-notes/workspace check
  • pnpm test:smoke

Follow-up Tasks

  • Confirm whether popup ViewHeader click handlers are live in the popup document or whether the subtree is mounted with stale context / broken delegation.
  • Reduce the popup regression back to production assertions only once the owner is fixed.
  • Re-run adjacent popup regressions after the leaf menu path is repaired.

Implementation Summary

Duplicate of #105.

The remaining popup regression is isolated to popup leaf `ViewHeader` interactivity when the title bar is enabled. Recent popup ownership and overlay portal fixes landed, but the popup leaf header menu still does not open inside the popout window. ## Problem The popup leaf menu regression is now narrow and reproducible: - The popup model reaches the correct selected markdown leaf. - The popup `ViewHeader` renders and the trigger is visible. - Clicking the popup leaf menu trigger does not transition the trigger to `aria-expanded="true"`. - No popup dropdown content appears, and no matching menu appears in the parent window. - The popup does not emit the stale-derived warning that previously accompanied overlay ownership bugs. The current focused regression lives in `packages/workspace/e2e/tab-drag-drop.spec.ts` as `popup leaf view menus render in the popup host without stale-derived errors`. ## Goal Make popup leaf `ViewHeader` controls fully interactive so popup-local leaf menus open and render in the popup host document, matching the behavior already achieved for popup overflow menus and other popup-local overlays. ## Scope - Popup `ViewHeader` menu trigger behavior when `appearence.interface.showTabTitleBar` is enabled. - Popup leaf dropdown rendering for the leaf header menu. - The popup mount / event-handling path if it is the owner of the broken interactivity. - Focused regression coverage for the popup leaf menu path. ## Non-goals - Redesigning popouts to use a separate top-level `App` runtime. - Reopening already-landed overlay portal fixes that are working for popup overflow menus and hover previews. - Broad multi-window architecture changes unrelated to popup leaf header interactivity. ## Acceptance Criteria - In a popup window with `showTabTitleBar` enabled, the leaf header menu trigger opens successfully. - The popup leaf dropdown content renders in the popup host document, not the parent window. - The popup leaf menu contains the expected items such as `Split down`. - The regression test in `packages/workspace/e2e/tab-drag-drop.spec.ts` passes without temporary diagnostics. - No `Reading a derived belonging to a now-destroyed effect` warning is emitted during the popup leaf menu flow. ## Implementation Notes - Current strongest finding: the popup workspace model reaches the correct selected leaf, but the popup `ViewHeader` trigger never reaches `aria-expanded=true`. - That shifts suspicion away from menu-content portal routing and toward popup header interactivity, mount lifecycle, or event delegation. - Recent experiments touched `ViewHeader`, API menu wrappers, and the popup regression test, but none produced a working open transition. - The popup mount path currently snapshots parent Svelte contexts through `getAllContexts()` in `popout-window-manager.svelte`; this is a likely owner worth verifying. ## Suggested Files or Specs To Inspect - `packages/workspace/src/lib/components/view-header/view-header.svelte` - `packages/workspace/src/lib/components/sidebar/popout-window-manager.svelte` - `packages/workspace/src/lib/components/sidebar/popout-window-shell.svelte` - `packages/api/src/lib/hooks/mountComponent.svelte.ts` - `packages/workspace/e2e/tab-drag-drop.spec.ts` - `packages/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte` - `packages/ui/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte` - `packages/workspace/spec.md` - `spec/src/20-packages/workspace/index.md` ## Validation Commands - `pnpm --filter @lapis-notes/workspace test:e2e e2e/tab-drag-drop.spec.ts --project=chromium --grep "popup leaf view menus render in the popup host without stale-derived errors"` - `pnpm --filter @lapis-notes/workspace test:e2e e2e/tab-drag-drop.spec.ts --project=chromium --grep "popup tab menus and markdown link previews render in the popup host"` - `pnpm --filter @lapis-notes/workspace check` - `pnpm test:smoke` ## Follow-up Tasks - Confirm whether popup `ViewHeader` click handlers are live in the popup document or whether the subtree is mounted with stale context / broken delegation. - Reduce the popup regression back to production assertions only once the owner is fixed. - Re-run adjacent popup regressions after the leaf menu path is repaired. ## Implementation Summary Duplicate of #105.
steve 2026-05-29 11:15:53 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#106
No description provided.