feat(cloud-sync): Runtime Sync tab, per-repo sync coverage, Channels-first sidebar - #650
Merged
Merged
Conversation
Runtime → cloud org gains a Sync tab rendering the same content as org management → Sync. Both surfaces now mount one wired CloudOrgSyncTab so they cannot drift apart. Adds a Session coverage section to that shared tab: one row per repo scope the org has configured, showing synced/syncable and a percentage, with the device-wide total in the section title. Rows are scoped to the org's own repos. A session is resolved through the same path the push pass uses (getSessionScopeKeys → peekMatchingOrgRepoScope against the org's repo-scope mirror), so a row is labelled with the exact org-side scope string the engine pushes as repoScopeKey. Sessions outside every org scope are excluded from both the rows and the totals, so the percentage means "of the work this org can receive". Denominators reuse the engine's own candidate filters: subagent and worker transcripts are dropped (isPrimarySessionListSession), as are teammate copies pulled down from an org (isCloudPushCandidate). The numerator is the durable push marker, so counts survive a restart. The manual-sync outcome note now renders before the primary button so it sits to its left in the right-aligned control cell. Pre-commit hook ran. Total eslint: 1, total circular: 0
Channels rows now sort above Team Sessions instead of below. Both are org-scoped server data, but Channels is the smaller, stable set and reads better as the section header of the cloud scope; Team Sessions grows without bound and pushed Channels off-screen. Extracts the merge into mergeCloudSidebarSections so the ordering is covered by a unit test rather than only observable through the assembled sidebar. The My Sessions separator is still appended downstream by buildCloudScopedMenuItems. Pre-commit hook ran. Total eslint: 0, total circular: 0
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
Adds a Sync tab to Runtime → cloud org (same content as org management → Sync), plus a Session coverage section on that shared tab showing one row per repo with the share of sessions synced to the org. Also moves cloud Channels above Team Sessions in the sidebar.
Problem
Solution
One shared tab. New
CloudOrgSyncTabwiresuseCloudOrgSyncStatustoCloudOrgSyncSection; both surfaces mount it, so they can't drift. Probes now fire when the tab opens rather than on every panel mount.Per-repo coverage. New pure module
org2CloudSyncCoverage.tsrenders one row per org repo scope — scope string,synced/syncable, meter, percentage — with totals in the section title. Sessions resolve through the same path the push pass uses (getSessionScopeKeys→peekMatchingOrgRepoScope), so rows carry the exact scope string the engine pushes asrepoScopeKey. Sessions outside every org scope are excluded from rows and totals, so the percentage means "of the work this org can receive."Denominators reuse the engine's own filters —
isPrimarySessionListSession(drops subagents/workers) andisCloudPushCandidate(drops teammate copies). Numerator is the durable push marker, so counts survive restarts.Also: manual-sync outcome note moved left of the primary button. i18n across all 13 locales.
Sidebar (separate commit, unrelated): Channels lead Team Sessions; merge extracted to
mergeCloudSidebarSectionsfor test coverage.Potential risks
useShareableScopeKeyVersion).sessionsAtom(hot); O(sessions) per change while open.Validation / Test plan
tsc --noEmitclean ·eslintclean, no new suppressionsOrg2Cloud/,CloudOrgPanelView/,dataSource/WorkstationSidebarConnector/Manual before merge: open Runtime → cloud org → Sync wit