Skip to content

fix(web-ui): polish promoted workspace reveal, persistence, and CLI peer reorder - #3943

Merged
bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/workspace-promotion-polish
Nov 16, 2026
Merged

bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/workspace-promotion-polish

Conversation

@bobleer

@bobleer bobleer commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up polish for #3938 and #3939 to fix animation/scroll clipping, flat/collapsed sidebar reveal, surface-switch races, background persistence latency, and CLI Peer host support when promoting re-added workspaces.

Type and Areas

Type: Bug fix / UI/UX / Refactor

Areas: Web UI (WorkspaceManager, workspaceDisplayOrder, WorkspaceListSection, MainNav, DeviceWorkspaceSections), CLI Peer Host (reorder_opened_workspaces), Product Operation Registry (remote_surface).

Motivation / Impact

Post-merge review of #3938 and #3939 uncovered several functional, UI/UX, performance, and duplication issues:

  • Unpersisted promotion reverted on workspace switch / CLI Peer gap: reorder_opened_workspaces was CLI_NOT_IMPLEMENTED on CLI Peer hosts, and when persistence failed, noteWorkspaceActivated mutated hostOrders so the next setActiveWorkspace refresh against a static-order host failed isActivationReorder and reverted the promoted sidebar order. CLI Peer now handles reorder_opened_workspaces (Agnostic / Proxied / HANDLED), and workspaceDisplayOrder tracks lastSeenHostOrders alongside activation-adjusted hostOrders (plus noteWorkspaceOrderPersisted when persistence succeeds).
  • FLIP animation & sticky header clipping: WorkspaceListSection ran scrollIntoView before measuring currentRect, baking -ΔscrollTop into every row's translateY animation (causing top neighbours to jump off-screen and animating unmoved off-screen rows), and aligned promoted rows under the 22px StickySectionHeader (clip-path clipped). Scroll reveal now clears StickySectionHeader, subtracts scrollDelta from FLIP offsets, and skips off-screen rows.
  • Flat view, collapsed device section, and already-first / new workspace reveal: Reveal coordination is decoupled from WorkspaceManager's WorkspaceEvent bus (removing workspace:promoted double-notification of global listeners). Explicit project opens switch flat view (all -> grouped), re-expand a manually collapsed active device section, wait for the row to mount at its promoted slot before scrolling, and also reveal already-first or newly opened projects when scrolled down. Reserved assistant roots opened through folder pickers (createProject) are no longer promoted or persisted as project reorders.
  • Non-blocking persistence, catalog resync coalescing, and surface-switch safety: openWorkspace / openRemoteWorkspace resolve immediately once state is published instead of blocking callers (NewProjectDialog, SSHRemoteProvider) on an extra reorderOpenedWorkspaces round-trip. In-flight order persistence defers workspace-catalog-changed resyncs until settled, guards against synchronous surface switches inside workspace:opened listeners, and normalizes mid-open surface-switch transport errors to SurfaceChangedError.
  • Deduplication: Removed buildPromotedOpenedWorkspaces in favor of parameterized buildReorderedOpenedWorkspaceIds, and unified openWorkspace / openRemoteWorkspace orchestration into runOpenWorkspaceFlow.

Verification

  • (cd src/web-ui && node scripts/run-vitest.mjs run src/infrastructure/services/business/workspaceManager.test.ts src/infrastructure/services/business/workspaceDisplayOrder.test.ts src/app/components/NavPanel/sections/workspaces/WorkspaceListSection.test.tsx src/app/components/NavPanel/sections/devices/DeviceWorkspaceSections.test.tsx src/features/ssh-remote/SSHRemoteProvider.test.tsx src/app/services/createProject.test.ts src/app/components/NavPanel/MainNav.projectCreation.test.tsx src/app/components/NewProjectDialog/NewProjectDialog.test.tsx src/app/components/NavPanel/unifiedSessionCreation.test.ts src/app/components/NavPanel/sections/workspaces/WorkspaceListSectionLayout.test.ts) — 10 files, 281+ tests passed.
  • pnpm run check:web — passed (tsc --noEmit, Appearance & Theme visual governance checks).
  • cargo test --locked -p openbitfun-product-domains --no-default-features remote_surface — 20 passed.
  • cargo test --locked -p openbitfun-cli --bin openbitfun peer_host::commands::tests and peer_host::args::tests — passed.
  • pnpm run fmt:rs && pnpm run capabilities:check && pnpm run check:core-boundaries && pnpm run check:repo-hygiene && git diff --check — passed.
  • node scripts/check-git-object-sizes.mjs --base upstream/main --head HEAD — passed.

Remote coverage: CLI Peer reorder_opened_workspaces handler & registry closure tested; SSH remote open/restore, Peer Device surface isolation, and unpersisted-order survival covered in unit tests (no live multi-machine run).

Reviewer Notes

AI-assisted; testing level: focused automated unit/contract verification and static checks (no manual live desktop/remote run). No persisted data format changes; reorder_opened_workspaces graduates from Unaudited / CLI_NOT_IMPLEMENTED to Agnostic / HANDLED.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable (no copy changes).

@bobleer
bobleer merged commit a64fcc7 into openBitFun:main Nov 16, 2026
13 checks 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.

1 participant