Skip to content

fix(dock): auto-close after unpinning ended process - #105

Merged
aliou merged 1 commit into
aliou:mainfrom
0xBB2B:fix/dock-unpin-auto-close
Aug 25, 2026
Merged

fix(dock): auto-close after unpinning ended process#105
aliou merged 1 commit into
aliou:mainfrom
0xBB2B:fix/dock-unpin-auto-close

Conversation

@0xBB2B

@0xBB2B 0xBB2B commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the process dock remaining visible after an ended process is unpinned from the /ps overview.

Context

The overview sends COMMAND_PIN with id: null when toggling off the pinned process. That handler cleared the focus and forced the dock to expanded, but rendered directly instead of applying the existing auto-close rule.

Closes #104.

Changes

  • Run the existing hardRefresh() after overview unpin.
  • Close and clear the dock when no managed process is live.
  • Keep the dock expanded in aggregate mode when another process is still live.
  • Add colocated regression tests and a patch changeset.

Testing

  • Confirmed the new regression test fails against the old implementation.
  • pnpm vitest run extensions/processes-dock/widget/setup.test.ts — 4 passed.
  • pnpm test — 642 passed.
  • pnpm test:e2e — 10 passed.
  • pnpm typecheck
  • pnpm lint
  • pnpm check:changesets
  • pnpm check:schema
  • pnpm check:lockfile
  • git diff --check

User impact / Release notes

Unpinning the last finished process from /ps now removes the stale dock frame. If another process is still running, the dock remains visible and returns to aggregate logs.

Notes for reviewers

The behavioral change is in the COMMAND_PIN null branch in setupDockWidgets; the two regression cases are in widget/setup.test.ts.

WHY: The /ps overview unpin path forced the dock open and rendered directly, bypassing the existing auto-close rule when every managed process had ended.

HOW: Route COMMAND_PIN with a null id through hardRefresh after clearing focus, and cover both the no-live-process and remaining-live-process paths with colocated regression tests.

WHAT: Unpinning the last finished process now clears the stale dock while unpinning with another live process keeps aggregate logs visible; unit, E2E, type, lint, changeset, schema, lockfile, and diff checks pass.
@aliou

aliou commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Thanks for this!

@aliou
aliou merged commit 07ad522 into aliou:main Aug 25, 2026
1 check 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.

Dock remains visible after unpinning an ended process from /ps

2 participants