feat(sidebar): add Agent Org hierarchy tree - #288
Open
chsimonpan wants to merge 934 commits into
Open
Conversation
chsimonpan
force-pushed
the
pr/org-hierarchy-tree
branch
from
July 8, 2026 09:38
fcb004d to
7107fcf
Compare
Publish the Browser host's render surface above the unified tab dispatcher via a new `BrowserHostProvider`, mirroring `ProjectHostProvider` (Phase 2.1). The value bundles the shared-webview activation flags + the DevTools polling stack (console/network/inspector entries, counts, selected element, webview label) + panel size/position handlers, so browser tab renderers can consume it via `useBrowserHostContext` instead of the bespoke BrowserLayout tree. - Add `Browser/context/browserHostContext.tsx` (provider + throwing accessor). - Mount `BrowserHostProvider` above the shell in BrowserLayout (additive; the bespoke SharedBrowserWorkspace / SharedBrowserDevToolsPanel render unchanged, and the new-browser-session effect stays mounted). - Convert `browser-session` renderer off HostCoupledPlaceholder to mount the rect-publisher (SharedBrowserWorkspace) for the MY_STATION host. - Convert `devtools` renderer off HostCoupledPlaceholder to render the real SharedBrowserDevToolsPanel from hoisted devtools data. - Convert `dom-component-preview` renderer to render DomComponentPreviewContent directly from tab data (self-contained; the host-coupling note was stale). Staged/inert: UnifiedTabContent is not yet mounted for browser tabs, so the live mount (Phase 2.2 step 4) is deferred. Pre-commit hook ran. Total eslint: 0, total circular: 0
Nothing is auto-opened on app start. The editor fixtures (Explorer, Source Control, Terminal) are no longer force-seeded (usePinnedTabs disabled) and are now closable/unpinned, so the pool can reach empty. When empty, AppShellContent renders a WorkStationStartPage launcher mirroring the + menu actions (search file, new/private browser tab, work items, projects). Everything lazy-loads from there. Pre-commit hook ran. Total eslint: 0, total circular: 0
Tabs persisted before the "all closable" change kept pinned:true / closable:false (Source Control, Terminal), so they rendered icon-only with no close button. The storage validator now normalizes every restored tab to closable/unpinned/named, and the tab strip no longer hides labels for pinned tabs. Reload to apply to already-open tabs. Pre-commit hook ran. Total eslint: 0, total circular: 0
The start page now offers Explorer (open-file-folder), Source Control, and Terminal alongside search / browser / work items / projects, each opening via WorkStationViewService with its shortcut badge. Those shortcuts are bound workstation-wide (useGlobalShortcuts), so they also fire from the empty start page. Pre-commit hook ran. Total eslint: 0, total circular: 0
Make the empty-pool launcher a real `start` tab type and fix its tiles (and the ⌘G/⌘E/⌘J shortcuts) so they actually open content. Root causes: - The content host was pinned by `dockFilter` (route-derived), so every opened tab rendered under whatever host the route pinned — usually the Code Editor showing Explorer. Now `effectiveHost` follows the active tab (`activeHost`); Browser stays reachable via an explicit `dockFilter === "browser"` pin since its sessions still live outside `mainPane`. Focusing any unified-strip tab releases that pin. - Explorer / Source Control / Terminal opened via a switch-to-tab path that no-oped when the (no-longer-seeded) tab was absent. The start-page tiles and `WorkStationViewService` now create real `mainPane` tabs via the tab factories / `EditorTabService`, activating an existing tab instead of re-opening it to avoid clobbering live data. Also register a `start` renderer, seed one start tab on mount when the pool is empty, and hide the launcher while the Browser host is showing. Pre-commit hook ran. Total eslint: 0, total circular: 0
Share one action list between the empty-pool launcher and the `+` menu, and rebrand the launcher as the Launchpad. - Extract useWorkStationLaunchActions as the single source of truth for the eight launch actions (search / Explorer / Source Control / Terminal / browser / private browser / work items / projects). Both the start page tiles and the TabBarPlusMenu dropdown render from it, so their items and icons always match — the dropdown now also offers Explorer / Source Control / Terminal. - Rebrand the `start` tab as "Launchpad" with the LayoutGrid icon (the same icon the chat panel uses); register LayoutGrid in the tab-icon map and title the launcher page "Launchpad". - Make the Launchpad an ephemeral placeholder (useLaunchpadTab, renamed from useEnsureStartTab): seed it when the pool empties, drop it once a real tab exists — so closing the last tab brings it back and opening anything replaces it. Pre-commit hook ran. Total eslint: 0, total circular: 0
- Drop the non-closable/pinned tab concept from the close paths so every tab (Source Control included) shows and honors its close button: SortableTab always renders it, and closeTab / closeAllTabs / closeOtherTabs / closeSavedTabs / closeActive no longer keep fixtures. - Render launch-action shortcuts with the shared KeyboardShortcut component (dropdown variant) — the same one the shortcut tooltips use — instead of KeyBadge, so the `+` menu and Launchpad match the tooltips. - Hide the "New Private Browser Tab" entrance from both surfaces (LAUNCHPAD_ACTION_IDS) while keeping the feature available in the hook. - Restyle the Launchpad as a compact quick-action list: label + shortcut rows, no icons. Pre-commit hook ran. Total eslint: 0, total circular: 0
- Give the Source Control tab and its launch action the FileDiff (file-diff) icon; register FileDiff in the tab-icon map. - Drop the Launchpad heading and subtitle so it's just the quick-action list. Pre-commit hook ran. Total eslint: 0, total circular: 0
Pre-commit hook ran. Total eslint: 0, total circular: 0
Point the launch actions at fully-translated shared keys so every label localizes: Files (common:labels.files), Review (common:actions.review), Terminal (common:tabs.terminal), Browser (labels.browser — the prior routes.browser key did not exist and fell back to raw text). Rename the Explorer and Source Control tab titles to Files and Review to match. Pre-commit hook ran. Total eslint: 0, total circular: 0
- Translate common:labels.files across all locales so "Files" is localized everywhere it's used. - Localize the singleton tool-tab titles in the strip (Launchpad, Files, Review, main Terminal) via getDisplayTitle. - Add a small leading icon to each Launchpad quick-action row. Pre-commit hook ran. Total eslint: 0, total circular: 0
- Render the 40px tab header empty on the Launchpad — no sidebar toggle, no search/lab actions (the code host, and thus its sidebar, is already hidden behind the launcher). - Use the Folder icon for Files and move it above Search file in both the Launchpad and the `+` menu. Pre-commit hook ran. Total eslint: 0, total circular: 0
Move the Browser host's "last consumed request tick" from a per-mount ref to a module-level atom, so a new-session request issued before the host mounts (New Browser from the empty Launchpad) still opens a session on mount, while a later remount with no new request doesn't re-fire. Pre-commit hook ran. Total eslint: 0, total circular: 0
Every rail action now goes to its existing tab or creates one through the unified tab system: Source Control / Terminal / Files via WorkStationViewService (open-or-activate), and Browser switches to an open browser tab or opens a fresh session. Drops the old bottom-panel and primary-sidebar coupling. Pre-commit hook ran. Total eslint: 0, total circular: 0
Remove the New Tab / New Private Tab / DevTools / Sidebar quick actions from the empty browser placeholder — the globe empty state now stands alone. Drops the browserQuickActions chain (host-context field and the renderer/placeholder wiring); the config helper was already removed. Pre-commit hook ran. Total eslint: 0, total circular: 0
Browser sessions already live in mainPane as browser-session tabs, so the active tab's host (activeHost) alone determines the visible surface. Drop the dockFilter === "browser" host pin from effectiveHost: opening browser from the focused-chat rail no longer strands the empty browser host over the Launchpad after the last tab is closed. Pre-commit hook ran. Total eslint: 0, total circular: 0
Match the rail to the Launchpad / `+` menu: Source Control now uses the FileDiff icon and the localized "Review" label; all labels are localized (Review / Browser / Terminal / Files); and the expanded rail shows the keyboard hint (⌘E / ⌘J / ⌘G) next to each action via KeyboardShortcut. Pre-commit hook ran. Total eslint: 0, total circular: 0
…d-tabs refactor(workstation): unify into a single tab surface + Launchpad
The unified WorkStation tab pool makes the visible content host follow the active tab via `activeHostAtom`; `dockFilter` no longer drives host selection, so remove the whole concept without changing behavior. - Relocate `activeHostAtom` to `store/workstation/tabHost.ts`; re-export it from the store barrel so imports keep working. - Delete the `store/workstation/dockFilter/` module (dockFilterAtom, DockFilter type, DEFAULT_DOCK_FILTER, path/query helpers). - Delete `useDockFilterUrlSync` (the `?filter=` URL sync) and the now-inert `useActiveTabHostReconciliation` (activeHost === effectiveHost always). - Rename `useAppShellDockFilterSync` -> `useAppShellRouteSync`, keeping only the base-path side effects (My Station, chat visibility, chat width). - `useAppShellDock` now always seeds ["code", "browser"] + the active tab's host so "New Browser" works and the host still mounts; drop the dead handleDockClick / activeDockId. - Sweep remaining reads in tab list, focus, launch actions, the focused-chat rail, tutorials, view service, open-in-workstation helpers, e2e helpers, and remove the unused i18n `workstation.dockFilter` keys across locales. Pre-commit hook ran. Total eslint: 0, total circular: 0
Pre-commit hook ran. Total eslint: 0, total circular: 0
Pre-commit hook ran. Total eslint: 0, total circular: 0
Audit of whether closing a unified WorkStation tab releases its resources. Findings: browser sessions, search cache, url-preview webviews, project drafts, and file/editor state are all freed on close (via reconciliation, close-path teardown, or React unmount). Terminal PTYs are intentionally persisted (global localStorage-backed pool); auto-killing them on close is risky and left as a recommendation. Adds a regression test locking the search session-cache cleanup across closeTab / closeAllTabs / closeOtherTabs / closeSavedTabs. Test-only, no runtime change. Pre-commit hook ran. Total eslint: 0, total circular: 0
Nothing produces or switches on appMode "data" — the Database app was archived and the tab bar's single-host modes are code/browser/project. Remove the dead union member and its stale doc comment. The database route stays (still used by the code editor's .sqlite preview). Pre-commit hook ran. Total eslint: 0, total circular: 0
The tab bar's "appMode" was always the active tab's host, passed as the app-wide AppModeType (`effectiveHost as AppModeType`). Type WorkstationTabBar and useWorkstationTrailingSlot on WorkstationTabHost instead, drop the now-dead single-host guard (activeHost is always code/browser/project), and tighten `effectiveHost` to WorkstationTabHost. Pre-commit hook ran. Total eslint: 0, total circular: 0
useAppShellRepo checked the repo path only when the route appMode was "code". In the unified surface the Code Editor shows whenever a code-host tab is active, so key the check off activeHost instead of the route. Pre-commit hook ran. Total eslint: 0, total circular: 0
Add explicit-save Git settings for commit and pull request instructions. Append those instructions across Source Control and agent-driven Git actions without replacing built-in constraints. Keep direct-provider and Cursor behavior aligned, preserve the old behavior for empty settings, cap inputs at 4000 characters, and surface persistence failures instead of reporting a false save. Verification: - pnpm run lint - pnpm run check:circular - pnpm exec vitest run focused Git prompt/profile/PR helper suites (49 passed) - cargo check -p git_api --lib - cargo clippy -p git_api --lib --no-deps - rustfmt --edition 2021 --check crates/git-api/src/commands/ai.rs - git diff --check - Manual visual verification passed
Pre-commit hook ran. Total eslint: 0, total circular: 0
Pre-commit hook ran. Total eslint: 0, total circular: 0
Add a Sessions tab to managed cloud organization settings using the shared SessionTable with member, agent, model, repository, and replay-state fields. Reuse the existing cloud remote-session cache and replay/fork actions, including loading, retry, empty, metadata-only, and retention states. Also align destructive row actions with secondary button styling, consolidate sharing controls, place members above invitations, and add unit plus rendered E2E coverage for the session table mapping and full-width layout. Pre-commit hook ran. Total eslint: 0, total circular: 0
Reduce the ChatHistory entry point to a focused composition boundary by extracting public types, projection, navigation, viewport, item-action, tail-collapse, planning-indicator, and render-view responsibilities. Add characterization coverage for tail-turn selection and conversation history page mapping, together with architecture and frontend UI audit reports. Pre-commit hook ran. Total eslint: 1, total circular: 0
Use source and agent app icons for shared sessions, add the supplied ORG2 app icon for native rows, and keep sidebar subtitles limited to activity time. Surface live viewer names in the cloud session hover card and cover the new watcher row with a focused test. Pre-commit hook ran. Total eslint: 12, total circular: 0
Publish Agent Org run-view and snapshot invalidations from their durable mutation owners so active UI projections refresh from committed state. Share run-view, Git numstat, and local-key reads across mounted consumers; coalesce bursts, reject stale results, queue follow-up reads after in-flight changes, and recover on reconnect or visibility changes. Derive intervention state from the canonical run view, schedule exact TTL expiry reconciliation, and remove duplicate intervention mutations from submit and queue layers. Suppress unchanged Git status broadcasts and normalize DevTools hotspot rates against the actual observation window. Add focused Rust and TypeScript regressions for the new lifecycle behavior. Pre-commit hook ran. Total eslint: 0, total circular: 0
Persist lightweight source-presence results separately from user scan policy. Probe enabled automatic sources at startup and every 30 minutes, skip full imports while their stores are absent, and import immediately when a store appears. Keep manual and disabled sources out of the probe path, preserve full-scan fallback when detection fails, and add scheduler coverage for startup, interval boundaries, discovery, failure handling, and global disable behavior. Pre-commit hook ran. Total eslint: 2, total circular: 0
perf: replace polling hot spots with push invalidation
Pre-commit hook ran. Total eslint: 0, total circular: 0
Resolve the ChatHistory grouping conflict by keeping the pure projection adapter introduced on develop and porting the PR's error-preservation behavior into useChatGroupsProjection. Preserve the CLI version scan changes and the removal of repeated tool-error deduplication.
Place the cloud team sessions group above local date-based session groups in organization scope. Keep reveal candidate ordering aligned with the rendered sidebar order. Pre-commit hook ran. Total eslint: 0, total circular: 0
feat(cli): add demand-driven version checks
Scope Realtime inbound synchronization to the affected cloud org, preserve delta cursors for ordinary changes, and avoid duplicate drain passes and empty outbox probes. Deduplicate shared comments, roster, and remote-session requests across mounted consumers; observe address-run completion through session status events with a sparse recovery check. Simplify imported shared-session header actions, update dual-instance coverage and translations, expose every likely polling hotspot, and include architecture and UI audit reports. Pre-commit hook ran. Total eslint: 0, total circular: 0
Resolve the coordination-store conflicts by preserving coordinator-owned task assignment, CAS finality, and shutdown disposition while integrating durable run-event invalidation. Keep intervention ownership in the session adapters and update merged frontend fixtures for the current Agent Org state shape.
Unwrap Codex Desktop exec_command wrappers into canonical shell calls. Map write_stdin polling to await_output, merge numeric-session and cell-wait continuations into the originating command, and preserve incremental output, stdin events, and exit status. Add parser and alias regression coverage. Pre-commit hook ran. Total eslint: 0, total circular: 0
…overy-invariants fix(agent-org): harden recovery, task orchestration, and run finality
Pre-commit hook ran. Total eslint: 0, total circular: 0
Add an Orca-style feature wall covering replay, cross-tool sessions, collaboration, time tracking, development tools, AI blame, and Design Mode.\n\nDocument the supported CLI agents with linked icon pills, remove the old status badges, and include optimized GIF and PNG assets for GitHub rendering. Pre-commit hook ran. Total eslint: 0, total circular: 0
Allow chat user-message rows to inherit the surrounding panel surface by removing the bg-chat-pane utility from the group header wrapper. Preserve the existing content width, spacing, and collapse behavior. Pre-commit hook ran. Total eslint: 0, total circular: 0
Reorder the seven visual feature rows into the product narrative requested for the README.\n\nTighten the headings around cross-tool session management, trajectory review, video-like tool-call replay, AI blame, time awareness, the development workspace, and Design Mode. Pre-commit hook ran. Total eslint: 0, total circular: 0
…ling perf(cloud): reduce shared-session polling
Move the native Rust harness to the top of the product story and describe its fast, token-saving, customizable workflow for existing keys and subscriptions.\n\nAdd the optimized harness demo, clarify replay support across the native harness and CLI agents, and retitle Supported Agents with ORG-2 listed first. Pre-commit hook ran. Total eslint: 0, total circular: 0
Feature the built-in Rust harness in the visual feature table and add its translated showcase to the Simplified Chinese README. Split supported agents by current GUI and TUI capability, and use the supplied ORG-2 application icon for the native harness tag. Pre-commit hook ran. Total eslint: 0, total circular: 0
Keep the built-in Rust harness exclusively as the first row in the visual feature table, removing the redundant full-width section above it. Pre-commit hook ran. Total eslint: 0, total circular: 0
Pre-commit hook ran. Total eslint: 3, total circular: 0
Pre-commit hook ran. Total eslint: 7, total circular: 0
Pre-commit hook ran. Total eslint: 7, total circular: 0
Pre-commit hook ran. Total eslint: 7, total circular: 0
Pre-commit hook ran. Total eslint: 44, total circular: 0
Pre-commit hook ran. Total eslint: 6, total circular: 0
chsimonpan
force-pushed
the
pr/org-hierarchy-tree
branch
from
July 18, 2026 02:44
7107fcf to
b2978de
Compare
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.
Follow-up from #283.
This PR adds an Agent Org hierarchy tree to the workstation sidebar so org/member/task/session relationships are visible instead of flattened into anonymous session rows.
What it adds:
Unlinkedfallback group.Why:
When Agent Orgs spawn multiple sessions/worktrees, a flat sidebar makes it hard to answer basic operational questions: which session belongs to which project/task, which rows are unlinked, and where should the operator act. This tree gives those relationships a stable visual shape.
Validation run on Linux:
vitestfororg2Tree.test.ts: passed (2 tests)npx tsc --noEmit -p tsconfig.json: passedcargo clippy --lib -p agent_core --message-format=short: passed (pre-existing warnings only)pnpm run tauri:build:fast: passed after applying fix(build): restore linux bundle target in fast parallel build #279's Linux bundle-target fix locally for validation, then reverted so this PR stays focused. Without fix(build): restore linux bundle target in fast parallel build #279, officialdevelopcurrently fails during bundle phase with thensis-on-Linux bug tracked in bug(build):pnpm run tauri:build:fastfails on Linux — nsis is not a valid bundle target #278.