Skip to content

fix(sessions): optimize workspace loading and refresh imports on reveal - #3719

Merged
kev1n77 merged 3 commits into
openBitFun:mainfrom
kev1n77:fix/workspace-session-discovery
Nov 3, 2026
Merged

kev1n77 merged 3 commits into
openBitFun:mainfrom
kev1n77:fix/workspace-session-discovery

Conversation

@kev1n77

@kev1n77 kev1n77 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Opening a workspace could flash a loading indicator and traverse disabled external sources. A completed discovery snapshot could also hide newly created external sessions until import was toggled off and on.

  • Separate initial navigation loading from background catalog work, batch metadata notifications, and reuse model configuration reads.
  • Query mixed enabled sources before pagination instead of traversing the full catalog.
  • Check enabled external sources once when a workspace list is revealed or its import settings change. One request waits for the host scan to complete; no periodic scans, progress polling, or window-focus scanning.
  • Skip reveal-triggered discovery when every external source is disabled, and retain upstream archived-session loading/error handling.

Type and Areas

Type: performance improvement and bug fix.

Areas: Web UI navigation/store, shared session services, external-session assembly, Desktop API, CLI Peer host.

Motivation / Impact

Existing session rows remain available while background work completes. New external sessions are discovered on the next collapse/reveal without toggling import. Holding a directory open does not keep scanning.

Verification

After rebasing onto upstream/main:

  • pnpm --dir src/web-ui exec node scripts/run-vitest.mjs run src/app/components/NavPanel/sections/sessions src/app/components/NavPanel/workspaceSessionView.test.ts src/flow_chat/store/FlowChatStore.test.ts src/infrastructure/api/service-api/SessionAPI.test.ts --maxWorkers=2 — 439 tests passed.
  • pnpm run check:web — passed.
  • git diff --check upstream/main...HEAD — passed.

Before the rebase:

  • cargo test --locked -p openbitfun-core --no-default-features --features external-sources,git,product-search --lib external_session_import:: — 64 passed, 3 ignored.
  • cargo test --locked -p openbitfun-services-core --no-default-features --features local-storage --lib session::page::tests — 13 passed.
  • cargo check --locked -p openbitfun-desktop --lib — passed.
  • cargo check --locked -p openbitfun-cli --bin openbitfun — passed.

The post-rebase Rust rerun was canceled while waiting for the target-directory lock held by a running desktop development build; it did not execute tests.

Manual verification to perform after rebuilding:

  1. Enable an external source and reveal the workspace list.
  2. Create another session in that external agent while leaving the list open; there should be no recurring discovery requests.
  3. Collapse and reveal the list; the new session should appear.
  4. Disable all external sources; subsequent reveals should skip external discovery.

Reviewer Notes

AI-assisted, with focused automated tests and compile checks. Native WebView interaction and live SSH workspace / Peer Device / Remote Control / Detached Dispatch scenarios have not been exercised; Peer request forwarding is covered by transport fixtures and compile checks.

New protocol fields are optional with legacy-deserialization coverage. Older hosts that cannot acknowledge the one-request refresh report failure instead of treating cached results as a successful refresh. No persisted-data migration is required.

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.

@kev1n77
kev1n77 merged commit ecf51e2 into openBitFun:main Nov 3, 2026
13 checks passed
@kev1n77
kev1n77 deleted the fix/workspace-session-discovery branch November 9, 2026 08:14
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