Repository navigation
feat(windows): add single_window_new_tab option for bare relaunch - #280
ItzELECTR0 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Talia preliminary review
| Check | Result |
|---|---|
| Merge score | 🟡 3/5 — Minor changes needed before merging |
| Findings | 🟡 1 medium |
| Review depth | 3/5 — how thoroughly the changed code could be checked by reading it |
| Coverage | 10 of 10 changed files reviewed |
What Talia checked: Checked the open()/restoreLastWindow paths, BrowserSettings/BrowserPreferenceId descriptors and static order assertions, dialog row visibility/search wiring, docs and tests; the remaining uncertainty is runtime UI refresh after settings change during an active search.
Findings
| # | Severity | Finding | Location |
|---|---|---|---|
| 1 | 🟡 P2 | Search results state goes stale when the relaunch row hides during sync | src/ui/dialogs/settings_dialog.cpp:308 |
Each finding is explained in a review comment on its line.
Run details
- Commit reviewed: 169d231
- Source lookups: 51 file reads, 60 searches
- Prompt version: 859b7490ca3d
Preliminary automated review: Talia read the changed code and related source; nothing was built, run or tested, and AI can make mistakes. It is not a scope acceptance or a promise to merge; a human reviewer makes the final call. See our ethos.
| const auto it = std::ranges::find(m_searchRows, m_singleWindowNewTabRow, &SearchRow::node); | ||
| shown = it != m_searchRows.end() && it->text.contains(m_query); | ||
| } | ||
| showNode(m_singleWindowNewTabRow, shown); |
There was a problem hiding this comment.
🟡 P2 (medium) · Search results state goes stale when the relaunch row hides during sync
The new SingleWindow wrapper in sync() hides m_singleWindowNewTabRow when m_current.singleWindow is false, but it only calls showNode on that row. applySearch (lines 713-718) shows/hides the row's card and m_noResults from the match set, and sync does not refresh them. Trigger: with Single Window on, search a query that matches only this row (e.g. "relaunch"), then click Reset All (onResetClicked -> m_resetAll -> preferences change -> sync), or let a config-file edit flip single_window off while the dialog is open. sync now hides the row, yet its "Tabs and Windows" card remains visible (shown by the earlier match) and the "No settings match" label stays hidden, leaving an empty results card. Correction: when the wrapper changes this row's availability during an active query, re-run applySearch(m_query) or otherwise recompute its card and m_noResults state instead of only hiding the row.
Talia preliminary review · correctness
|
Thanks for the PR! Closing it because Single Window already covers this without a new option: a launch with a folder opens a tab in the existing window, so binding SUPER+E to 'luciole ~' gives a new tab on each press. |
Summary
browser.single_window_new_tab(falseby default) toBrowserSettingsand expose it as "Open New Tab on Relaunch" under Settings > General > Tabs and Windows (shown when "Single Window" is on).WorkspaceApplication::openso that whensingle_windowandsingle_window_new_tabare both enabled, launchingluciolewithout locations opens a new tab in the existing window instead of just focusing it.restoreLastWindowwith!existingso a bare relaunch in an already-open window opens a fresh tab rather than restoring a closed window's session.Motivation
When "Single Window" is enabled, launching
lucioleagain without arguments only focuses the existing window. Those who bind a global shortcut to launch their file manager (e.g. SUPER+E) and expect repeated presses to open new tabs (as in Thunar for example) had no way to opt into that behavior. The default isfalsekeeping the existing behavior but also allowing to change it.Type of Change
Related Issue
Closes #262
Testing
CCACHE_DIR=/tmp/ccache just build: builtluciolecleanly with zero warnings.meson test -C build-debug settings --print-errorlogs:luciole:settingspassed (1/1 OK).CCACHE_DIR=/tmp/ccache just test:77/79tests passed;preview-metadataandthumbnailfailed but are unrelated to this change.CCACHE_DIR=/tmp/ccache just lint:clang-tidy(226 files,--warnings-as-errors='*'),lint-python, andlint-prosepassed.just format-check && just i18n-check && just role-alpha-check: all passed (2416keys checked).Screenshots / Videos
Screen.Recording.2026-12-01.153448.mp4
Checklist
SCOPE.md, or its scope was agreed in an issue or on Discord first.CONTRIBUTING.md.just format, or this PR has no C++ changes.just lintand the relevant build or test commands, or explained why they were not run.just role-alpha-check, or this PR does not change UI colors.docs/, or this PR does not change user-facing behavior or settings.