Skip to content

Refine contextual Project and Space popovers#307

Merged
DeadWaveWave merged 4 commits into
mainfrom
feat/optimizing-pop-up-ui
Jul 12, 2026
Merged

Refine contextual Project and Space popovers#307
DeadWaveWave merged 4 commits into
mainfrom
feat/optimizing-pop-up-ui

Conversation

@DeadWaveWave

@DeadWaveWave DeadWaveWave commented Jul 12, 2026

Copy link
Copy Markdown
Owner

💡 Change Scope

  • Small Change: Fast feedback, localized UI/logic, low-risk.
  • Large Change: New feature, cross-boundary logic, runtime-risk (persistence, IPC, lifecycle, recovery).

📝 What Does This PR Do?

Refines Project and Space operation UI into compact, anchored contextual popovers.

  • Local Project creation opens the directory picker directly and derives the project name from the selected folder.
  • Remote Project creation uses a compact contextual flow.
  • Space worktree create/archive/guard flows are anchored beside their triggering menu action instead of blocking the whole application.
  • Only the affected Space enters a local frosted busy state while an operation is running.
  • Nested branch selectors are owned transient layers, so selecting a branch no longer dismisses the parent popover.
  • Popover geometry, control sizing, layering, light/dark themes, reduced motion, and initial measurement behavior are unified.
  • Integrates the latest main dismissable-layer primitives while preserving transient parent ownership for nested portaled selectors.
  • Documents the contextual operation-window contract and adds unit/E2E regression coverage.
  • Repairs the recovery Worktree E2E fixture so it uses an owned temporary Git repository and never treats persisted application state as filesystem deletion authority.
  • Synchronizes the recovery test with the new asynchronous Space-local busy state before launching terminals.

🏗️ Large Change Spec (Required if "Large Change" is checked)

1. Context & Business Logic

Project and Space actions previously used app-level modal windows with inconsistent geometry and blocking behavior. The new behavior follows contextual menu semantics before confirmation, then switches only the target Space into a local running state after confirmation.

The recovery E2E previously treated disappearance of the editor as operation completion. With asynchronous local progress, that could race the Git operation and feed a stale source path into destructive cleanup. The fixture now owns an isolated temporary repository and waits for the durable Space directory transition before continuing.

2. State Ownership & Invariants

  • Renderer operation state owns draft/running/error presentation for each Space.
  • Worktree services and persisted workspace state remain the durable owners of filesystem and binding results.
  • A draft popover never blocks unrelated application interaction.
  • A nested transient layer never dismisses its owning popover.
  • A running operation disables only its target Space and cannot leave a stale busy veil after completion or failure.
  • Local Project naming is derived from the selected directory basename.
  • E2E cleanup may delete only the temporary repository root created by that test.
  • A persisted Worktree path is assertion input, never deletion authority.
  • The created Worktree must be a canonical non-root descendant of the fixture Worktree directory and registered by git worktree list --porcelain -z.

3. Verification Plan & Regression Layer

  • Unit coverage for anchored placement, nested transient-layer dismissal, Project flow, worktree phase transitions, and Space overlay state.
  • Electron E2E coverage for branch selection, anchor geometry, dark/light themes, reduced motion, local Project creation, remote UI, and restart recovery.
  • Full unit suite: 372 files passed, 1451 tests passed.
  • Targeted UI Electron E2E: 4/4 passed.
  • Repaired recovery Electron E2E: 3 consecutive runs passed.
  • Post-merge Worktree branch-menu E2E: 3 consecutive targeted runs passed.
  • Full unfiltered pnpm pre-commit: exit 0; staged Vitest 240 files passed / 3 skipped (868 tests passed / 3 skipped), native Electron terminal recovery 3/3 passed, and Electron E2E 262 passed / 47 conditionally skipped with zero retries.
  • Repository integrity was checked after the repaired recovery case: HEAD, project files, node_modules, and clean Git status remained intact.

✅ Delivery & Compliance Checklist

  • My code passes the ultimate gatekeeper: pnpm pre-commit is completely green.
  • I have signed the CLA if required (see CLA.md).
  • I have included new tests to lock down the behavior.
  • I have strictly adhered to the DEVELOPMENT.md architectural boundaries.
  • I have attached a screenshot or screen recording (if this touches the UI).
  • I have updated the documentation accordingly.

📸 Screenshots / Visual Evidence

Visual artifacts were captured locally for dark theme, light theme, the expanded branch list, and the opening motion. They can be attached to this draft during review.

@DeadWaveWave DeadWaveWave marked this pull request as ready for review July 12, 2026 08:39
@DeadWaveWave DeadWaveWave merged commit f8ee5f6 into main Jul 12, 2026
9 of 10 checks passed
@DeadWaveWave DeadWaveWave deleted the feat/optimizing-pop-up-ui branch July 12, 2026 08:40
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