Repository navigation
feat(nav): pin the assistant above the workspace order - #3446
Merged
bobleer merged 2 commits intoOct 18, 2026
Merged
Conversation
The sessions section mixed assistants and project workspaces in one ordering list, so the assistant could sit between projects and took part in drag reordering. Pin assistant groups above the workspace list and keep them out of the drag order: project drags now rewrite project positions only. A hidden or not-yet-created assistant has no opened workspace, so the pin simply disappears and the workspace list stays untouched. Projects keep their own ordering, and the flat view still folds project sessions into the aggregate list below the pin. Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
A hidden or never-created assistant must not disturb the flat view: no pinned row, no empty workspace placeholder, and the aggregate project session list stays in place. Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The sessions section rendered assistants and project workspaces from one ordering list, so the assistant (e.g. 小芳) could sit between projects and took part in drag reordering. Assistants are a product-level identity rather than one workspace among many, so they are now pinned above the workspace list and stay out of the workspace order.
reorderOpenedWorkspacesInSection('projects', …)), so the assistant's stored slot is never touched.setActiveWorkspace) brings the pin back automatically.Type: bug fix / UI-UX
Areas: web UI (navigation sidebar), E2E navigation spec.
Motivation / Impact
The assistant is a single, always-reachable identity; project workspaces are an ordered, user-managed list. Mixing both in one sortable list let the assistant drift whenever the user reordered projects, and a project could even be dropped above it. After this change the assistant is always the first entry of the sessions section, and project ordering behaves exactly as before.
No data migration: persisted workspace order is still read as-is. Only rendering and the drag target section change.
Verification
CI (this PR, head
6fb4f0045):Frontend Build— passed (repository hygiene, i18n audits, theme audits,lint:web,pnpm --dir src/web-ui run test:run,build:web, mobile web checks).Rust / CLI Validation— passed after re-running a Windows job that timed out inside theComputer Use clipboard contractsstep; the same step and the rest of the job passed on the re-run.Shell Deploy Scripts,Repository Object Sizes,Build Impact— passed.Local:
pnpm --dir src/web-ui exec vitest run src/app/components/NavPanel— newWorkspaceListSectioncases pass; the only failures are 4 pre-existing cases in this host environment where Node 26 exposes a globallocalStoragethat shadows jsdom (localStorage.clear()throws). The same failures reproduce on an unmodifiedmaincheckout, and the same suites pass on CI.pnpm --dir src/web-ui exec tsc --noEmit -p tsconfig.json— passed.pnpm run lint:web,pnpm run check:repo-hygiene,pnpm run theme:visual-contract,pnpm run verify:webkit-compatibility:test,pnpm run build:web— passed.npx tsc --noEmitintests/e2e— passed.Test coverage added in
WorkspaceListSection.test.tsx: pinned above projects with a reversed stored order, assistant excluded from the drag group while projects stay draggable, pin above the flat list, no pin and no placeholder when the assistant is absent or hidden (grouped and flat), and the empty state.tests/e2e/specs/l0-navigation.spec.tsnow includes the pinned row in the group-spacing selector so the pin-to-first-workspace gap stays covered.Reviewer Notes
data-openbitfun-partvalues; the pin keeps the existingitempart plus adata-session-group-pinnedhook.Generated with OpenBitFun