Skip to content

Commit 1c2fd50

Browse files
committed
chore(release): bump to 1.9.4 and eliminate all auto-defaults for Compare Left/Right path fields
On bare GUI launches the path editors now always start empty (with placeholders), regardless of any prior recent session, /tmp/ dev folder, test fixture, or last-compare data. The "Restore last session" setting and Sessions page still allow explicit re-open of previous single- or multi-tab workspaces (the only way the fields get populated after a bare start). This removes the root cause of the "defaults to fake folder names" UX complaint. The bare-launch path through open_last_session still cleans internal fixtures out of the recent list for display, but no longer constructs a launch context to pre-apply to the Compare page. Version, changelogs, metainfo, and docs updated; restore_multi_tab_context kept (with allow(dead_code)) for snapshot tests and future explicit use.
1 parent 1ea1341 commit 1c2fd50

11 files changed

Lines changed: 74 additions & 32 deletions

File tree

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ members = [
99
resolver = "3"
1010

1111
[workspace.package]
12-
version = "1.9.3"
12+
version = "1.9.4"
1313
edition = "2024"
1414
license = "GPL-3.0-only"
1515
repository = "https://github.com/visorcraft/LinSync"

apps/linsync-gui/qml/AboutPage.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import org.kde.kirigami as Kirigami
1010
Kirigami.ScrollablePage {
1111
id: page
1212

13-
property string appVersion: "1.9.3"
13+
property string appVersion: "1.9.4"
1414

1515
signal navigateRequested(int section)
1616
signal creditsRequested()

apps/linsync-gui/qml/Main.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Kirigami.ApplicationWindow {
7676
property bool validationCompatible: false
7777
property string validationMessage: ""
7878
property string validationPathKind: ""
79-
property string appVersion: "1.9.3"
79+
property string appVersion: "1.9.4"
8080
property int bridgeModelRevision: 0
8181
property bool canUndo: false
8282
property bool canRedo: false

apps/linsync-gui/src/main.rs

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,21 @@ fn run(paths: &AppPaths, args: Vec<OsString>) -> Result<ExitCode, String> {
9292
RecentSessionStore::new(paths.recent_sessions_file(), recent_limit(paths));
9393
if let Ok(mut recent) = recent_store.load_or_default() {
9494
// Drop any entries that point at our internal test fixtures (leftover
95-
// pollution from dev / smoke runs that used `cargo run -p linsync -- ...`).
96-
// This keeps the auto-restore from ever pre-filling the Compare page
97-
// with /.../tests/fixtures/... paths.
95+
// pollution from dev / smoke runs...). This keeps the list shown on
96+
// the Sessions page (and reopen) free of them. We *intentionally do
97+
// not* set launch_context here: on a bare launch we never auto-populate
98+
// the Compare page's Left/Right path fields (or its diff state) from
99+
// any previous session. That was the source of "defaults to fake
100+
// folder names" (/tmp/bigfolder etc.). Users start with clean blank
101+
// inputs (the placeholders); prior work is resumed explicitly from
102+
// the Sessions sidebar.
98103
recent.sessions.retain(|s| {
99104
!path_looks_like_internal_test_fixture(&s.session.left)
100105
&& !path_looks_like_internal_test_fixture(&s.session.right)
101106
});
102-
if let Some(session) = recent.sessions.first() {
103-
// Prefer restoring the full multi-tab workspace; fall back to the
104-
// single active tab when no multi-tab snapshot is present.
105-
launch_context = Some(restore_multi_tab_context(session).unwrap_or_else(|| {
106-
let tab = build_tab_for_session_file(session, &GuiCompareOptions::default());
107-
GuiLaunchContext::single_tab(tab)
108-
}));
109-
}
107+
// (We still load+filter so the on-disk recent is "considered" for
108+
// cleanup when the setting is enabled, and the /sessions/recent
109+
// responder will also filter.)
110110
}
111111
}
112112

@@ -1571,6 +1571,13 @@ fn persist_multi_tab_snapshot(session: &mut SessionFile, context: &GuiLaunchCont
15711571
/// Rebuild a multi-tab launch context from a recent session's snapshot, if it
15721572
/// carries one. Returns `None` when there is no (valid) multi-tab snapshot, so
15731573
/// the caller can fall back to single-tab restore.
1574+
///
1575+
/// Marked allow(dead_code) because the only non-test caller was the bare-launch
1576+
/// auto-restore path (intentionally removed to stop auto-defaulting path fields
1577+
/// into the Compare editor); the function remains for explicit multi-tab
1578+
/// snapshot round-tripping in tests and for potential future "reopen last
1579+
/// workspace" action.
1580+
#[allow(dead_code)]
15741581
fn restore_multi_tab_context(session: &SessionFile) -> Option<GuiLaunchContext> {
15751582
let value = session.layout.extra.get(GUI_TABS_SNAPSHOT_KEY)?;
15761583
let snapshot: GuiMultiTabSnapshot = serde_json::from_value(value.clone()).ok()?;
@@ -1584,18 +1591,23 @@ fn restore_multi_tab_context(session: &SessionFile) -> Option<GuiLaunchContext>
15841591
}
15851592

15861593
/// Heuristic: never treat paths under the source tree's tests/fixtures/ as
1587-
/// persistable "recent" entries. These fixtures are used by gui-smoke.sh,
1588-
/// release-smoke, unit tests, and manual `cargo run -p linsync -- <fixture>`
1589-
/// invocations during development. Recording them causes the auto-restore of
1590-
/// the "last session" (when open_last_session is true) to pre-fill the Compare
1591-
/// page's Left/Right fields with ugly internal paths on subsequent bare
1592-
/// launches — terrible UX.
1594+
/// persistable "recent" entries (for recording or for display in the Sessions
1595+
/// page / reopen). These fixtures are used by gui-smoke.sh, release-smoke,
1596+
/// unit tests, and manual `cargo run -p linsync -- <fixture>` invocations
1597+
/// during development. We also never auto-restore *any* previous session's
1598+
/// paths into the main Compare page's Left/Right input fields on a bare launch
1599+
/// (no CLI args). Pre-filling those fields from "last session" (even real
1600+
/// user data or /tmp/ dev folders like bigfolder) produced a horrible
1601+
/// experience of "defaults" the user didn't choose. The Sessions page and
1602+
/// explicit re-open / project open are the way to resume prior work.
15931603
fn path_looks_like_internal_test_fixture(p: &Path) -> bool {
15941604
let s = p.to_string_lossy().to_ascii_lowercase();
15951605
// Covers /tests/fixtures/ (unix), \tests\fixtures\ (windows), and
15961606
// trailing cases.
1597-
s.contains("/tests/fixtures/") || s.contains("\\tests\\fixtures\\")
1598-
|| s.ends_with("/tests/fixtures") || s.ends_with("\\tests\\fixtures")
1607+
s.contains("/tests/fixtures/")
1608+
|| s.contains("\\tests\\fixtures\\")
1609+
|| s.ends_with("/tests/fixtures")
1610+
|| s.ends_with("\\tests\\fixtures")
15991611
}
16001612

16011613
fn tab_has_persistable_paths(tab: &GuiCompareTab) -> bool {

docs/known-limitations-1.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Known Limitations
22

33
This document is the user-facing summary of what LinSync does *not* do
4-
in the current release (1.9.3). For the shipped feature record, see
4+
in the current release (1.9.4). For the shipped feature record, see
55
`docs/feature-matrix.md`. Items here fall into two
66
categories:
77

packaging/arch/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# package.
1414

1515
pkgname=linsync
16-
pkgver=1.9.3
16+
pkgver=1.9.4
1717
pkgrel=1
1818
pkgdesc="Linux-native visual file and folder comparison built on Rust + Qt 6"
1919
arch=('x86_64')

packaging/com.visorcraft.LinSync.metainfo.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
</screenshot>
7171
</screenshots>
7272
<releases>
73+
<release version="1.9.4" date="2026-06-03">
74+
<description>
75+
<p>Remove *all* automatic defaults for the Compare page's Left and Right path fields on bare GUI launch. The editors now always start blank (showing the friendly placeholders), no matter what "last session", dev /tmp/ folder, test fixture, or prior compare exists in the recent-sessions store. The "Restore last session" feature and Sessions page continue to work for explicit re-opening of previous work (single or multi-tab), which is the only way paths get populated after a bare start. This directly addresses the complaint that defaulting the inputs to any "fake folder names" (tests/fixtures, /tmp/bigfolder, etc.) was a horrible user experience. Only an explicit two-path launch (e.g. from the shell), drag-and-drop, browse, typing, or a deliberate reopen action will ever put values into the path editors.</p>
76+
</description>
77+
</release>
7378
<release version="1.9.3" date="2026-06-03">
7479
<description>
7580
<p>Fix horrible first-launch UX on the Compare page: the Left and Right path fields no longer default to internal test fixture directories such as <code>.../tests/fixtures/folders/left</code> (and the text pair). These fixtures are used by the smoke scripts, unit tests, and manual dev runs; previously they were eligible for "recent sessions" recording (because they are valid comparable data) and would be auto-restored on every bare GUI launch when the "Restore last session" setting was on. Now paths under <code>tests/fixtures/</code> are excluded from recording (in tab_has_persistable_paths) and filtered out of the recent list on restore and on the Sessions page. Updated the tests that directly exercised recording of fixture launches to use clean temp files instead. The root cause was lack of a guard for repo-internal test data in the persist-recent path.</p>

packaging/debian/changelog

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
linsync (1.9.4-1) unstable; urgency=medium
2+
3+
* Remove *all* automatic defaults for the Compare page's Left and Right path
4+
fields. On a bare launch (the normal case: no two positional arguments on
5+
the command line), the editors now always start empty, showing the
6+
placeholders "Left file or folder" / "Right file or folder". Previous
7+
"last session" (whether from fixtures, /tmp/bigfolder, real user compares,
8+
or anything) is no longer auto-applied to populate the inputs or the
9+
initial diff view. The "Restore last session" setting and the recent-
10+
sessions store / Sessions sidebar remain fully functional for *explicit*
11+
resume (click to re-open a previous compare or multi-tab workspace); that
12+
action will then set the paths. This finally eliminates the "why are we
13+
defaulting to fake folder names" problem.
14+
* Implementation: on bare launch the open_last_session path still cleans
15+
internal fixtures out of the recent list (for the Sessions page), but no
16+
longer synthesizes a launch context that would drive the path properties
17+
in QML. Only explicit CLI launches, UI browse/type, drag, or explicit
18+
reopen set non-empty values in the path fields.
19+
20+
-- VisorCraft LLC <licensing@visorcraft.com> Wed, 03 Jun 2026 18:23:00 -0500
21+
122
linsync (1.9.3-1) unstable; urgency=medium
223

324
* UX: prevent the Compare page's Left/Right path editors from defaulting to

packaging/rpm/linsync.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# -bb linsync.spec
1414

1515
Name: linsync
16-
Version: 1.9.3
16+
Version: 1.9.4
1717
Release: 1%{?dist}
1818
Summary: Linux-native visual file and folder comparison
1919

@@ -122,6 +122,10 @@ if [ $1 -eq 0 ]; then
122122
fi
123123

124124
%changelog
125+
* Wed Jun 03 2026 VisorCraft LLC <licensing@visorcraft.com> - 1.9.4-1
126+
- Stop auto-defaulting *any* previous paths (from recent sessions, last launch, /tmp/ dev fixtures like bigfolder, or anything else) into the Compare page's Left and Right input fields on bare GUI startup. The "Restore last session" setting and recent-sessions store are still present for explicit resume via the Sessions sidebar and re-open; they no longer mutate the primary path editors or pre-load a diff view on launch. This eliminates the ridiculous "defaults to fake folder names" experience entirely. Bare launches (the common case) now always start with blank editors showing the nice placeholders ("Left file or folder", "Right file or folder"), ready for the user to choose fresh paths. Only explicit CLI `linsync left right`, drag-and-drop, browse, or explicit reopen from Sessions/projects will populate the fields.
127+
- The root cause was the combination of open_last_session=true (default) + using the most-recent SessionFile to synthesize a launch context that drove the QML path properties.
128+
125129
* Wed Jun 03 2026 VisorCraft LLC <licensing@visorcraft.com> - 1.9.3-1
126130
- UX fix for Compare page defaults: paths under the source tree's tests/fixtures/ (used by gui-smoke.sh, release-smoke, unit tests, and manual dev launches like `cargo run -p linsync -- <fixture>`) are now excluded from recent-paths and recent-sessions recording, and are filtered out on load/restore/reopen. This prevents bare GUI launches (no args, with open_last_session=true) from pre-filling the Left/Right editors with ugly internal absolute paths such as .../tests/fixtures/folders/left on every startup. The Sessions page list and reopen-by-index also hide them. (The root cause was that fixture folders are valid comparable data, so the old "persistable" guard let dev usage pollute the user's XDG state dir.)
127131
- Updated the affected unit tests (that asserted recording of fixture launches) to use clean temp files from test_file_root() instead.

0 commit comments

Comments
 (0)