Skip to content
Closed
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
276f56f
Add offline notes queue that sends to an agent once online
Jun 26, 2026
79efa4c
Raise Swift file-length budget for files grown by the notes feature
Jun 26, 2026
5223c27
Address review: real Settings row, bounded flush writes, localized alias
Jun 26, 2026
9fead72
Address review: @Observable store, off-main writes, deterministic target
Jun 26, 2026
4be2070
Address review: bound the queue + migrate tests to Swift Testing
Jun 26, 2026
d86d8b7
Address review: cap total queue + persist each hand-off durably
Jun 26, 2026
fd6ae11
Address review: bind notes to capture workspace + stage visibly
Jun 26, 2026
1640d97
Address review: auto-flush online captures + start queue at launch
Jun 26, 2026
12ff7e4
Address review: make capture durable on quit
Jun 26, 2026
50991e9
Address review: fresh JSON coders per write (fix encoder data race)
Jun 26, 2026
7a41245
Address review: shrink queue caps so capture write stays cheap
Jun 26, 2026
c23a722
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
Jun 26, 2026
c87b536
Address review: serialize persistence + split offline-notes files
Jun 26, 2026
a439163
Address review: serialize persistence on one queue (fix terminate race)
Jun 26, 2026
8fc7dde
Address review: let the CLI select the Notes sidebar mode
Jun 26, 2026
c31258f
Address review: one-type-per-file splits + Swift Testing for new cove…
Jun 26, 2026
3286d66
Address review: don't strand notes when flush runs before windows exist
Jun 26, 2026
5c3e501
Address review: deliver offline notes only to the visible workspace
Jun 26, 2026
d5ecf70
Fix build: construct store dependencies in the @MainActor init body
Jun 26, 2026
4dabcb5
Fix test build: construct fake dispatcher in the @MainActor helper body
Jun 26, 2026
c8ffc74
Localize notes mode in right-sidebar CLI help + remote usage text
Jun 26, 2026
2fee19a
Retry deferred offline notes when their workspace becomes visible
Jun 26, 2026
892c5e8
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
Jun 27, 2026
d3aae65
Merge origin/main into issue-6483-offline-cmux-notes-should-queue-agent
austinywang Jul 2, 2026
4fa61a8
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
austinywang Jul 2, 2026
c77be11
Add failing regression tests for note byte-size cap
austinywang Jul 2, 2026
541b794
Cap offline notes by Unicode scalar count, not grapheme clusters
austinywang Jul 2, 2026
3efc85c
Isolate offline-notes queue per bundle; harden reachability + launch
austinywang Jul 2, 2026
550549f
Add failing tests for offline notes load-path queue bounding
austinywang Jul 2, 2026
365bd00
Bound the offline notes queue on load (count + file-size caps)
austinywang Jul 2, 2026
6aed526
Isolate notes beta default in command-palette mode test
austinywang Jul 2, 2026
45056c6
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
austinywang Jul 2, 2026
998125f
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
austinywang Jul 2, 2026
9aecb82
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
austinywang Jul 3, 2026
5284f4d
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
austinywang Jul 3, 2026
45cbb2d
Address offline notes policy review
austinywang Jul 3, 2026
756664f
Fix offline note row helper visibility
austinywang Jul 3, 2026
3cfff38
Model offline notes composer staging
austinywang Jul 4, 2026
a41d256
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
austinywang Jul 4, 2026
d1d4fe1
Regenerate Swift file length budget
austinywang Jul 4, 2026
141b2c7
Merge remote-tracking branch 'origin/main' into issue-6483-offline-cm…
austinywang Jul 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/swift-file-length-budget.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Format: max_lines<TAB>relative path
# Reduce counts as files shrink. CI fails if tracked files exceed this budget.
34430 CLI/cmux.swift
17978 Sources/AppDelegate.swift
16487 Sources/ContentView.swift
18000 Sources/AppDelegate.swift
16484 Sources/ContentView.swift
14232 Sources/TerminalController.swift
13071 Sources/Workspace.swift
12348 cmuxTests/AppDelegateShortcutRoutingTests.swift
Expand All @@ -17,7 +17,7 @@
7218 cmuxTests/WorkspaceRemoteConnectionTests.swift
6359 cmuxTests/SessionPersistenceTests.swift
6217 cmuxTests/GhosttyConfigTests.swift
6166 Sources/TabManager.swift
6171 Sources/TabManager.swift
5915 cmuxTests/TerminalAndGhosttyTests.swift
5809 Sources/TextBoxInput.swift
5573 cmuxTests/BrowserConfigTests.swift
Expand Down Expand Up @@ -62,13 +62,13 @@
1560 cmuxTests/TextBoxMentionCompletionTests.swift
1500 cmuxUITests/MultiWindowNotificationsUITests.swift
1499 cmuxTests/OmnibarAndToolsTests.swift
1447 Sources/FileExplorerStore.swift
1433 Sources/RemoteTmuxControlConnection.swift
1420 cmuxTests/AppDelegateIssue2907RoutingTests.swift
1384 cmuxTests/KeyboardShortcutSettingsFileStoreStartupTests.swift
1380 cmuxUITests/MenuKeyEquivalentRoutingUITests.swift
1363 Sources/CMUXInstalledExtensionSidebarHostView.swift
1360 Sources/Feed/FeedButtonStyleDebugWindowController.swift
1317 Sources/FileExplorerStore.swift
1295 Packages/macOS/CmuxTerminalCore/Sources/CmuxTerminalCore/Config/GhosttyConfig.swift
1295 cmuxTests/MobileHostAuthorizationTests.swift
1290 cmuxTests/TextBoxSubmitActionTests.swift
Expand All @@ -92,12 +92,12 @@
1006 cmuxTests/CmuxSSHURLRequestTests.swift
1002 Packages/iOS/CmuxMobileShell/Tests/CmuxMobileShellTests/PairedMacBackupTests.swift
982 Packages/Shared/CmuxAgentChat/Tests/CmuxAgentChatTests/ChatConversationStoreTests.swift
955 Sources/CommandPalette/CommandPaletteSettingsToggle.swift
953 cmuxTests/DockSocketLifecycleTests.swift
951 Sources/App/TerminalDirectoryOpenSupport.swift
948 Sources/App/ShortcutRoutingSupport.swift
947 Sources/TerminalNotificationPolicy.swift
945 Sources/SessionIndexRegisteredAgents.swift
944 Sources/CommandPalette/CommandPaletteSettingsToggle.swift
942 Packages/iOS/CmuxMobileShellUI/Tests/CmuxMobileShellUITests/WorkspaceMacSelectionTests.swift
937 Sources/TextBoxMentionIndexStore.swift
929 Sources/Panels/TerminalPanel.swift
Expand All @@ -114,7 +114,7 @@
847 cmuxTests/AgentSessionAutoResumeSettingsTests.swift
845 cmuxTests/SSHStartupSignalLifecycleTests.swift
841 Packages/iOS/CmuxMobileShell/Tests/CmuxMobileShellTests/TerminalOutputDeliveryQueueTests.swift
834 Sources/MainWindowFocusController.swift
837 Sources/MainWindowFocusController.swift
830 Sources/TaskManagerTypes.swift
825 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/TerminalComposerView.swift
813 Sources/WorkspaceContentView.swift
Expand All @@ -132,9 +132,9 @@
756 Sources/Panels/AgentSessionWebRendererCoordinator.swift
754 Sources/TerminalController+ControlWorkspaceContext.swift
752 cmuxUITests/CloseWorkspaceCmdDUITests.swift
750 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceDetailView.swift
739 cmuxTests/CLICodexHookTimeoutRegressionTests.swift
738 Packages/macOS/CMUXProjectModel/Sources/CMUXProjectModel/XcodeProjectAdapter.swift
724 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceDetailView.swift
718 Packages/Shared/CmuxAuthRuntime/Sources/CmuxAuthRuntime/Coordinator/AuthCoordinator.swift
716 Sources/TaskManagerSnapshot.swift
715 Sources/AppleScriptSupport.swift
Expand Down Expand Up @@ -173,7 +173,7 @@
624 Packages/iOS/CmuxMobileShell/Tests/CmuxMobileShellTests/MobileShellRenderGridLivenessTests.swift
620 cmuxTests/FinderFileDropRegressionTests.swift
620 cmuxTests/TerminalNotificationQueueTests.swift
617 Sources/SettingsNavigation.swift
619 Sources/SettingsNavigation.swift
613 Packages/iOS/CmuxMobileShell/Tests/CmuxMobileShellTests/MobileShellRenderGridLivenessTestSupport.swift
608 cmuxUITests/FeedSidebarUITests.swift
607 Packages/macOS/CmuxTerminal/Sources/CmuxTerminal/Surface/TerminalSurface.swift
Expand Down Expand Up @@ -202,22 +202,22 @@
567 Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BrowserSection.swift
567 Packages/macOS/CmuxTerminalCore/Sources/CmuxTerminalCore/ConfigDiscovery/GhosttyConfigDiscovery.swift
563 Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Pane/ControlCommandCoordinator+Pane.swift
562 Sources/RightSidebarPanelView.swift
562 cmuxTests/AgentExecutableResolverTests.swift
561 Packages/Shared/CMUXMobileCore/Sources/CMUXMobileCore/MobileTerminalRenderGrid.swift
561 cmuxTests/GhosttyConfigPathResolverTests.swift
560 cmuxTests/CLISSHPTYResizeInputTests.swift
558 Packages/macOS/CmuxGit/Sources/CmuxGit/Parsing/GitMetadataService+Config.swift
553 Sources/RightSidebarPanelView.swift
549 Sources/Panels/BrowserAutomation.swift
547 Packages/iOS/CmuxMobileShell/Sources/CmuxMobileShell/BackingUpPairedMacStore.swift
546 Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AutomationSection.swift
544 cmuxUITests/DisplayResolutionRegressionUITests.swift
542 Sources/App/WorkspaceRuntimeSettings.swift
539 CLI/CMUXCLI+Themes.swift
539 CLI/CodexTeamsApprovalBridge.swift
538 Packages/macOS/CmuxRemoteWorkspace/Sources/CmuxRemoteWorkspace/PTYBridge/RemotePTYBridgeSession.swift
537 Sources/TerminalController+ControlSurfaceContext2.swift
536 cmuxTests/CmuxConfigContextMenuTests.swift
535 Sources/App/WorkspaceRuntimeSettings.swift
532 Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Scene/SettingsWindowScene.swift
530 Sources/BrowserPaneDropTargetView.swift
530 Sources/TerminalController+ControlSurfaceContext3.swift
Expand Down
4 changes: 2 additions & 2 deletions CLI/CMUXCLI+ThemeSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ extension CMUXCLI {

func isRightSidebarCLIMode(_ value: String) -> Bool {
switch value.lowercased() {
case "files", "find", "vault", "sessions", "feed", "dock":
case "files", "find", "vault", "sessions", "feed", "dock", "notes":
return true
default:
return false
Expand All @@ -441,7 +441,7 @@ extension CMUXCLI {

func normalizedRightSidebarCLIArgument(_ value: String) -> String {
switch value.lowercased() {
case "files", "find", "vault", "sessions", "feed", "dock":
case "files", "find", "vault", "sessions", "feed", "dock", "notes":
return value.lowercased()
default:
return value
Expand Down
10 changes: 5 additions & 5 deletions CLI/cmux.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15911,10 +15911,10 @@ struct CMUXCLI {
show Show the right sidebar
hide Hide the right sidebar
focus Focus the current right sidebar mode
set <files|find|vault|sessions|feed|dock>
set <files|find|vault|sessions|feed|dock|notes>
Show, switch mode, and focus
mode Print {"visible":bool,"mode":string}
files|find|vault|sessions|feed|dock
files|find|vault|sessions|feed|dock|notes
Alias for show + set + focus

Flags:
Expand Down Expand Up @@ -16605,7 +16605,7 @@ struct CMUXCLI {

case "set":
guard parsed.positional.count == 2 else {
throw CLIError(message: String(localized: "cli.rightSidebar.error.setRequiresMode", defaultValue: "right-sidebar set requires a mode: files, find, vault, sessions, feed, or dock"))
throw CLIError(message: String(localized: "cli.rightSidebar.error.setRequiresMode", defaultValue: "right-sidebar set requires a mode: files, find, vault, sessions, feed, dock, or notes"))
}
let mode = parsed.positional[1].trimmingCharacters(in: .whitespacesAndNewlines)
guard isRightSidebarCLIMode(mode) else {
Expand All @@ -16617,7 +16617,7 @@ struct CMUXCLI {
}
return args

case "files", "find", "vault", "sessions", "feed", "dock":
case "files", "find", "vault", "sessions", "feed", "dock", "notes":
guard parsed.positional.count == 1 else {
throw CLIError(message: String(localized: "cli.rightSidebar.error.unexpectedArguments", defaultValue: "right-sidebar \(action) received unexpected arguments"))
}
Expand Down Expand Up @@ -34308,7 +34308,7 @@ export default CMUXSessionRestore;
open-notification --id <uuid>
jump-to-unread
clear-notifications [--workspace <id|ref|index>] [--window <id|ref|index>]
right-sidebar <toggle|show|hide|focus|set|mode|files|find|vault|sessions|feed|dock> [--workspace <id|ref|index>] [--window <id|ref|index>] [--no-focus]
right-sidebar <toggle|show|hide|focus|set|mode|files|find|vault|sessions|feed|dock|notes> [--workspace <id|ref|index>] [--window <id|ref|index>] [--no-focus]
sidebar <validate|reload|select|open> [name]
set-status <key> <value> [--workspace <id|ref|index>] [--window <id|ref|index>] [--icon <name>] [--color <#hex>] [--priority <n>]
clear-status <key> [--workspace <id|ref|index>] [--window <id|ref|index>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ public struct BetaFeaturesCatalogSection: SettingCatalogSection {
userDefaultsKey: "rightSidebar.beta.dock.enabled"
)

/// Right-sidebar Notes: an experimental mode for capturing notes while
/// offline and queuing them so cmux can hand them to an agent once
/// connectivity returns. Defaults off; while off, the Notes mode is
/// hidden from the switcher so the feature stays opt-in while in beta.
public let rightSidebarNotes = DefaultsKey<Bool>(
id: "rightSidebar.beta.notes.enabled",
defaultValue: false,
userDefaultsKey: "rightSidebar.beta.notes.enabled"
)

/// Extensions: the experimental ExtensionKit sidebar-extension surface
/// (puzzle button, sidebar-toggle provider menu, installed-extension
/// host, and the extensions browser). Defaults off; while off, every
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ import SwiftUI
public struct BetaFeaturesSection: View {
@State private var feed: DefaultsValueModel<Bool>
@State private var dock: DefaultsValueModel<Bool>
@State private var notes: DefaultsValueModel<Bool>
@State private var extensions: DefaultsValueModel<Bool>
@State private var customSidebars: DefaultsValueModel<Bool>
@State private var remoteTmux: DefaultsValueModel<Bool>

public init(defaultsStore: UserDefaultsSettingsStore, catalog: SettingCatalog) {
_feed = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.rightSidebarFeed))
_dock = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.rightSidebarDock))
_notes = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.rightSidebarNotes))
_extensions = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.extensions))
_customSidebars = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.customSidebars))
_remoteTmux = State(initialValue: DefaultsValueModel(store: defaultsStore, key: catalog.betaFeatures.remoteTmux))
Expand All @@ -33,6 +35,8 @@ public struct BetaFeaturesSection: View {
SettingsCardDivider()
dockRow
SettingsCardDivider()
notesRow
SettingsCardDivider()
extensionsRow
SettingsCardDivider()
customSidebarsRow
Expand All @@ -47,6 +51,7 @@ public struct BetaFeaturesSection: View {
let models: [any SettingObservationStarting] = [
feed,
dock,
notes,
extensions,
customSidebars,
remoteTmux,
Expand Down Expand Up @@ -88,6 +93,23 @@ public struct BetaFeaturesSection: View {
}
}

@ViewBuilder
private var notesRow: some View {
SettingsCardRow(
configurationReview: .settingsOnly,
searchAnchorID: "setting:betaFeatures:notes",
String(localized: "settings.betaFeatures.notes", defaultValue: "Notes"),
subtitle: notes.current
? String(localized: "settings.betaFeatures.notes.subtitleOn", defaultValue: "Shows Notes in the right sidebar mode switcher to capture notes offline and send them to an agent once you're online.")
: String(localized: "settings.betaFeatures.notes.subtitleOff", defaultValue: "Hides Notes from the right sidebar until you enable it here.")
) {
Toggle("", isOn: Binding(get: { notes.current }, set: { notes.set($0) }))
.labelsHidden()
.controlSize(.small)
.accessibilityIdentifier("SettingsBetaNotesToggle")
}
}

@ViewBuilder
private var extensionsRow: some View {
SettingsCardRow(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ struct SettingsRowAnchorResolutionTests {
"setting:mobile:iOSPairingDisplayName",
"setting:betaFeatures:feed",
"setting:betaFeatures:dock",
"setting:betaFeatures:notes",
"setting:betaFeatures:customSidebars",
"setting:betaFeatures:remoteTmux",
"setting:customSidebars:enabled",
Expand Down
Loading
Loading