Skip to content

fix(FIX-011, FIX-014): drop --temp mode and command palette; rebind Ctrl+Shift+{N,P}#35

Merged
vikgmdev merged 1 commit into
mainfrom
fix/FIX-011-temp-mode-no-pane
May 6, 2026
Merged

fix(FIX-011, FIX-014): drop --temp mode and command palette; rebind Ctrl+Shift+{N,P}#35
vikgmdev merged 1 commit into
mainfrom
fix/FIX-011-temp-mode-no-pane

Conversation

@vikgmdev
Copy link
Copy Markdown
Owner

@vikgmdev vikgmdev commented May 6, 2026

Summary

  • FIX-011: drop --temp mode entirely. Post-P-018 (AD-016) the unpinned-default lifecycle already covers what --temp was for, with a recoverable Undo affordance on top. The remaining "no on-disk trace" gap was too small to justify a separate CLI flag, menu item, action handler, accelerator, and ~200 LoC of legacy local-only fallback code.
  • FIX-014 (bundled mid-QA): drop the Ctrl+Shift+P command palette. It duplicated F1's adw::ShortcutsWindow with rendering glitches and no fuzzy-search affordances — net-negative UX. Ctrl+Shift+P now opens the existing F1 keyboard-shortcuts dialog.
  • Ctrl+Shift+N rebound from the deleted --temp action to the existing win.new-window action so muscle memory is preserved and the unbound-accelerator → kitty-keyboard escape leak is fixed.

Net diff: 4 files / +88 / −747 / −659 LoC.

What changed

File Change
src/cli.rs Delete pub temp: bool field.
src/main.rs Delete args.temp references in is_bare_launch and LaunchOptions initializer.
crates/forgetty-gtk/src/app.rs Delete LaunchOptions.temp field, the "New Temporary Window" menu item, the win.new-temp-window action handler + accelerator + command-palette CommandEntry, and ~10 if launch.temp branches (inlining the surviving else body in each). Delete the entire 540-LoC command-palette section (struct CommandEntry, command_registry, build_command_palette, build_palette_row, move_palette_selection, close_command_palette, open_command_palette, toggle_command_palette) plus its overlay creation, click-outside gesture, and action handler. Add Ctrl+Shift+N accel for win.new-window and migrate Ctrl+Shift+P onto win.show-shortcuts's existing accel list (alongside F1, Ctrl+?, Ctrl+Shift+/).
crates/forgetty-gtk/src/settings_view.rs Delete New Temporary Window and Command Palette ActionDefs. Update New Window and Keyboard Shortcuts (reference) default_accels to include Ctrl+Shift+N and Ctrl+Shift+P respectively.

Root cause

P-018 (shipped 2026-05-05, AD-016) flipped the persistence default from "always persist" to "trash on close unless explicitly pinned". After that change --temp became a near-duplicate of the unpinned default — the only daylight between them was that unpinned writes a recoverable trash/{uuid}.json while --temp wrote nothing. Vick's read at QA time: "--temp is not needed anymore as default start is temp already, right?" Right.

The command palette was a separate pre-existing UX issue surfaced during FIX-011 testing — its rendering had Overlay-positioning bugs and its content largely overlapped F1's keyboard-shortcuts dialog. Deleting it removed the broken half of a duplication; F1 (the GNOME-native adw::ShortcutsWindow) survives as the single source of truth.

How the fix works

--temp deletion: every if launch.temp { A } else { B } block reduces to B. Because daemon_client: Option<Arc<DaemonClient>> was only None for --temp, it is now provably always Some(...) — the now-dead daemon_client.is_none() legacy fallback paths (e.g. duplicate_workspace_temp_fallback) compile clean and are deferred to CHORE-FIX-011-cleanup to keep this PR a tight, reviewable deletion.

Ctrl+Shift+N rebind: 4 surgical edits — add an accel registration for win.new-window, add an accel attribute to the menu item, update the (deleted-anyway) CommandEntry shortcut label, and update settings_view.rs default_accels. Without this, the keystroke would fall through GtkShortcutController to the focused DrawingArea and emit a kitty-protocol escape (0;6u) into the shell — caught by Vick's T2 in fix-cycle 1.

Command palette deletion: sed -i '6666,7205d' for the section, plus 5 caller-site Edit operations. Ctrl+Shift+P is added to win.show-shortcuts's existing accel list — same idiom as the other multi-binding action.

Tests

Automated (all PASS):

  • cargo check --workspace
  • cargo build --release
  • cargo clippy --workspace -- -D warnings
  • cargo fmt --all
  • cargo test --workspace --exclude forgetty-gtk — 203 unit tests pass, no rewrites needed
  • cargo bench --bench daemon_hotpath: idle 17.4 µs (28× under SPEC's 500 µs ceiling), cold-start 18.26 ms (11× under 200 ms ceiling). Hot path untouched, all changes are control-plane.

Human (Vick, in dev session) — all PASS:

  • T1: forgetty --temp rejected by clap.
  • T2 (after fix-cycle 1): Ctrl+Shift+N opens "New Window" with no PTY escape leak.
  • T3: Command palette has no "temporary" filter result.
  • T4: Default unpinned launch → sessions/trash/{uuid}.json on close, Undo toast fires.
  • T5: Pin → sessions/{uuid}.json, auto-restore on relaunch.
  • T6: Daily-driver smoke (system-installed forgetty unaffected).
  • T7 (FIX-014): Ctrl+Shift+P opens the F1 keyboard-shortcuts dialog.
  • T8 (FIX-014): No command palette UI anywhere; no menu entry; no settings row.

ADs affected

None changed status. AD-011 (daemon mode is the only mode) is now true on every code path now that --temp is gone. AD-016 (pinned-aware close + daemon does not survive) preserved. AD-001 (one daemon per window) preserved.

Deferrals

  • CHORE-FIX-011-cleanup: delete the now-unreachable duplicate_workspace_temp_fallback family (~150 LoC), refactor daemon_client: Option<Arc<DaemonClient>>Arc<DaemonClient> (provably always Some post-FIX-011), collapse the now-single-child main_overlay. Estimated 200–300 LoC future shrinkage.
  • FEAT-001: real command palette (fuzzy search, instant invoke, recently-used, surfaces menu-only and dynamic actions). Schedule when Forgetty's action surface outgrows what F1's adw::ShortcutsWindow ergonomically displays — likely after Android device-pairing or initial plugin services land.

…trl+Shift+{N,P}

After P-018 (AD-016) the unpinned-default lifecycle (active/ → trash/
on clean close, recoverable for 30s via Undo or --restore-session)
already covers what --temp was for. The remaining gap (--temp wrote
nothing on disk, unpinned writes a trashable file) was too small to
justify a separate code path, CLI flag, menu item, action handler,
accelerator, and ~200 LoC of legacy local-only fallback code. FIX-014
bundled mid-QA per dogfood directive: the Ctrl+Shift+P command palette
duplicated F1's adw::ShortcutsWindow with rendering issues, so the
540-LoC custom popover plus its registry were deleted and Ctrl+Shift+P
rebound onto the existing win.show-shortcuts action. Ctrl+Shift+N
rebound to win.new-window so muscle memory is preserved and the
unbound-accelerator → kitty-keyboard escape leak (a fix-cycle 1
regression Vick caught at T2) is fixed.

ADs: AD-011 (daemon mode is the only mode) preserved on every code
path now that --temp is gone. AD-016 (pinned-aware close + daemon does
not survive) preserved. AD-001 (one daemon per window) preserved. No
AD changes.

Perf: pty_to_subscriber_idle 17.4 µs (28× under SPEC's 500 µs ceiling),
daemon_cold_start 18.26 ms (11× under 200 ms ceiling). Criterion
change% flagged regressions vs P-018's 2.87 ms cold-start measurement
which was a host-quiet outlier; absolute numbers are at-noise vs the
FIX-005A baseline (15.86 ms) and well within SPEC. Hot path untouched.

Net: 4 files, +88 / −747 / −659 LoC. CHORE-FIX-011-cleanup follow-up
deletes the now-unreachable duplicate_workspace_temp_fallback family
and refactors daemon_client: Option<Arc<>> → Arc<>. FEAT-001 filed for
a real fuzzy command palette to revisit when the action surface
outgrows F1.
@vikgmdev vikgmdev merged commit 26024a1 into main May 6, 2026
2 of 3 checks passed
@vikgmdev vikgmdev deleted the fix/FIX-011-temp-mode-no-pane branch May 6, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant