Skip to content

[Task] Harden interaction locks and session route ownership #413

@Astro-Han

Description

@Astro-Han

Goal

PawWork should keep the immediate fixes from #412, then harden the two boundaries that made the May 4 packaged-app failure dangerous:

  • Temporary resize/drag/overlay states must not be able to leave the whole UI unclickable.
  • Explicit session routes such as /:dir/session/:id must not be overwritten by project-opening or layout sync logic.

When this is done, the app should have a clear ownership rule for these interactions, plus regression coverage that exercises the delayed failure modes.

Scope

In scope:

  • Audit all app-level interaction locks that can affect pointer events, especially resize, drag, overlays, dialogs, dropdowns, and side panels.
  • Define the smallest shared release contract for temporary interaction locks: all release events, route/visibility/blur cleanup, and whether a timeout fallback is needed.
  • Replace ad hoc long-lived global pointer-events disabling where it can deadlock the UI.
  • Separate project-opening navigation from explicit session navigation. Suggested actions: openProject(projectRoot), openSession(directory, id), and newSession(directory).
  • Ensure layout effects respond to the current URL instead of re-navigating over an explicit /:dir/session/:id route.
  • Add delayed-stability e2e coverage for explicit session switching and post-resize clickability.

Out of scope:

Relevant files or context

Context:

Likely files:

  • packages/app/src/pages/layout.tsx
  • packages/app/src/pages/layout/sidebar-items.tsx
  • packages/app/src/pages/layout/pawwork-sidebar.tsx
  • packages/app/src/pages/session/helpers.ts
  • packages/app/src/pages/session/session-side-panel.tsx
  • packages/ui/src/components/resize-handle.tsx
  • packages/app/e2e/sidebar/sidebar-session-links.spec.ts
  • packages/app/e2e/commands/panels.spec.ts

Verification

  • Add or update unit tests for any extracted route/navigation helper semantics.
  • Add e2e coverage where clicking an existing session remains on /:dir/session/:id after a delayed stability window, not just immediately after the click.
  • Add e2e coverage where project opening still lands on /:root/session.
  • Add e2e coverage where a resize/drag gesture releases correctly and sidebar actions remain clickable afterward. At minimum, verify new session, an existing session row, and one non-session control.
  • Run the targeted app unit tests and affected Playwright specs.
  • Confirm there are no unrelated UI copy, layout, or route-shape changes.

Execution mode

Agent should investigate and propose a plan first

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityappApplication behavior and product flowsplatformElectron shell, OS integration, packaging, updater, signing, paths, and permissionstaskNarrow execution, audit, spike, migration, tracking, or upstream follow-up workuiDesign system and user interface

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions