-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Description
When a terminal is opened for the first time, the shell briefly starts in / before cd-ing to the target working directory. The per-frame CWD tracking loop (runtime.zig:1397–1407) picks up this transient / and calls persistence.appendRecentFolder("/"), permanently inserting it into the recent_folders list. Because this happens on every new terminal spawn, / accumulates a high visit count and floats to the top of the Cmd+O overlay. Users who never intentionally navigate to / find it dominating the list. Additionally, existing persistence.toml files already contain this spurious entry, so a one-time migration that removes / from saved recent_folders data is needed.
Steps to Reproduce
Starting state: Fresh install or cleared ~/.config/architect/persistence.toml; recent_folders is empty.
- Open Architect.
- Open a new terminal (the shell spawns, briefly cwd is
/, then cd's to the target dir). - Open the Cmd+O recent-folders overlay.
Reproducibility: Always
Expected Behavior
/ does not appear in recent_folders unless the user explicitly navigates to it (e.g., cd /).
Actual Behavior
/ appears at or near the top of the recent-folders list after opening any terminal.
Suspected Area
src/app/runtime.zig— per-frame CWD update loop (updateCwd+appendRecentFoldercall, lines 1397–1407): the initial transient/cwd must be suppressed.src/config.zig—appendRecentFolder(lines 471–498) and migration logic (lines 311–394): a V4 migration pass should strip/from existingrecent_foldersdata.
Acceptance Criteria
- Opening a new terminal no longer adds
/torecent_folders(unless the user subsequently navigates there manually). - A persistence migration (V4) removes any existing
/entry fromrecent_folderson the first load after upgrading. - Manually running
cd /in a terminal does still add/bump/inrecent_folders. - The fix does not break existing tests; regression test added if feasible.
-
docs/configuration.mdmigration notes updated to reflect the new V4 format.