-
Notifications
You must be signed in to change notification settings - Fork 43
🤖 feat: layout slots + slot hotkeys #1725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b2be1df0a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review Addressed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e7eaf8bec
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review Follow-up: slot hotkeys now call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 067e253903
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review Normalization now drops modifier-less |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8040f7026d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8040f7026d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Change-Id: I10152520fced6d45a8fd2e361c7a8a086689d900 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: Ic4baec7d12a95ebffd8f3d990b54102b78fd0cd3 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I3f2da4aaf32ac1e974bc48b74509c9837fe913dc Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: Idc4c883f7614bed57ced8718c964e086d63a0dc6 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I589572f8da4fe4b47ba7f628c5b940613aed6fa9 Signed-off-by: Thomas Kosiewski <tk@coder.com>
8040f70 to
59e5db8
Compare
Change-Id: I9ccc39546f476f8ace1232ba3dfa2d42bf7a3f87 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review Addressed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2e1d92a04
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Change-Id: Iecc135a3a4c5f7ee9e48c69b61f7eaaeb706db34 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review Addressed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 772d51687f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Change-Id: If0ddbb0182e2cb258cb4e72ae8abb5c7053f5e64 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review Addressed: write operations now call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b8f892af5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Change-Id: I56966116ee4c8fd8957f1a8404f4e5de0f8483ea Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review Addressed: applying a preset now preserves any extra backend terminal sessions by adding tabs for unmapped sessions into the focused tabset, so sessions don’t become unreachable until reload. |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Change-Id: Ida9e598183242034f2f8f3fef0f2e0069f1ff86e Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I961835bc183c617bb347c9f2e55c525138a6ac26 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I0755a3340a6aa01b9c22a0e3f4aaad1f640a13cc Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
UI Tests (Chromatic) is currently pending for this PR and needs baseline approval:
All other GitHub checks are passing on my side. |
Adds user-configurable Layout Presets for the left sidebar + right sidebar layout.
~/.mux/config.json(validated + versioned), exposed via new ORPC endpoints.Validation:
make static-check📋 Implementation Plan
User-configurable layout presets + hotkeys (investigation + implementation plan)
What exists today (building blocks)
Layout state
sidebarCollapsed(global) set insrc/browser/App.tsx.RightSidebarLayoutState(src/browser/utils/rightSidebarLayout.ts) → recursivesplit+tabsetnodes with ratios.src/common/constants/storage.ts):right-sidebar:layout:${workspaceId}(per-workspace)right-sidebar:collapsed(global)right-sidebar:width(global, stored as a raw string px value viauseResizableSidebar)rightSidebarLayout.tsand via the command palette helperupdateRightSidebarLayout()insrc/browser/utils/commands/sources.ts(writes to localStorage usingupdatePersistedState).Commands + hotkeys
registerSource(() => CommandAction[])(src/browser/contexts/CommandRegistryContext.tsx, wired insrc/browser/App.tsx).src/browser/utils/ui/keybinds.ts(KEYBINDSconstant) and consumed by global listeners inApp.tsx,useAIViewKeybinds.ts, andRightSidebar.tsx.src/browser/components/Settings/sections/KeybindsSection.tsx).Competitive / expectation check
Sources / links
(See exploration report for links.)
What’s missing (gaps)
TerminalTabrequires a realterminal:<sessionId>; a layout preset cannot safely store session IDs and reapply them later.Feasibility + does this make sense?
Yes, and the codebase is already most of the way there. Mux already:
The main complexity is terminal session creation during preset application and keybind conflict management.
Recommended approach (v1): “Layout Presets” stored in
~/.mux/config.json+ command palette + hotkeysWhy config.json
~/.mux.Trade-off: if a user downgrades to an older mux build and that build writes
config.json, it will likely drop unknown fields (includinglayoutPresets). If downgrade/upgrade preservation matters, prefer the dedicatedlayouts.jsonalternative below.Storage + API surface
ProjectsConfig(src/common/types/project.ts):layoutPresets?: LayoutPresetsConfig.LayoutPresetsConfig = { version: 1; presets: LayoutPreset[]; slots: LayoutSlot[] }LayoutSlot = { slot: 1|2|3|4|5|6|7|8|9; presetId?: string; keybindOverride?: Keybind }src/node/config.ts):loadConfigOrDefault()parses + validateslayoutPresetsdefensively (invalid → empty).saveConfig()writeslayoutPresetsback out.uiLayouts.getAll() -> LayoutPresetsConfiguiLayouts.saveAll({ layoutPresets: LayoutPresetsConfig }) -> voidcontext.config.editConfig(...).Preset + slots schema (file-backed)
LayoutPreset(hotkeys are attached to slots, not presets):id: string(uuid)name: stringleftSidebarCollapsed: booleanrightSidebar: { collapsed: boolean; width: { mode: 'px', value: number } | { mode: 'fraction', value: number }; layout: RightSidebarLayoutPresetState }LayoutSlot[](1–9):keybindOverride?: KeybindRightSidebarLayoutPresetStatemirrorsRightSidebarLayoutStatebut is portable:costs|review|explorer|statsterminal_new:<stableId>(no session IDs)file:*tabs so presets are project/workspace agnostic.Save current layout → preset
When user saves a preset for the currently selected workspace:
terminal:<sessionId>with a stableterminal_new:*file:*tabslayoutPresets.presets, then persist viauiLayouts.saveAll(...).layoutPresets.slots[*].presetId.Apply slot (hotkey) / apply preset (palette)
Applying a slot/preset to the currently selected workspace:
0. Determine the preset:
layoutPresets.slots[slot].presetIdsidebarCollapsedRIGHT_SIDEBAR_COLLAPSED_KEYRIGHT_SIDEBAR_WIDTH_KEY(compute px if preset uses fraction)existing = await api.terminal.listSessions({ workspaceId })createTerminalSession)RightSidebarLayoutStateintoright-sidebar:layout:${workspaceId}.UX surface
Layout: Apply Slot 1..9(title includes assigned preset name when set)Layout: Save current as preset…Layout: Apply Preset <preset>(optional escape hatch for >9 presets)Hotkey handling
layoutPresets.slots[*].keybindOverrideand replace the default.KEYBINDS.*or other slot bindingsDefensive / self-healing rules
Net LoC estimate (product code only)
Alternative approaches
A) Store presets in a dedicated
~/.mux/layouts.json(or.jsonc) file (downgrade-safe)LayoutsConfigreader/writer (likeConfig, but scoped to layouts) + ORPC endpoints; UI logic stays the same.B) “Hard slots only” (fixed hotkeys, no overrides, no preset list)
Ctrl/Cmd+Alt+1..9.Non-goals for v1
Generated with
mux• Model:openai:gpt-5.2• Thinking:high• Cost:$3.86