Skip to content

fix(linux): keep dropped tabs in place, read CSV previews off the GTK thread and drop Relm4 - #4056

Merged
datlechin merged 9 commits into
mainfrom
refactor/linux-standards-fixes
Nov 6, 2026
Merged

datlechin merged 9 commits into
mainfrom
refactor/linux-standards-fixes

Conversation

@datlechin

@datlechin datlechin commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Tabs: a tab dropped outside every window goes back where it was instead of jumping to the first place. create-window returns the tab's own view, since libadwaita has no way to decline the new window it asks for. A tab dropped on another window's bar goes back to the place it left, not the end. A tab whose session closed while it was out closes instead of staying orphaned. The session's teardown no longer asks its view to close a page it does not hold. The ownership rule is in state-management.md, Tabs.
  • CSV Import: an AdwDialog subclass with a composite template. The preview is read on the blocking pool, with a RequestSequencer ticket per read: a replaced or closed read is skipped or dropped, and the dialog shows "Reading the file…" until the current read lands. The summary pluralizes fields and rows separately.
  • Saved Queries: an AdwDialog subclass on GtkListView, with one SavedQueryObject per query, a filter model and a section per connection. A search runs on the blocking pool over a lowercase snapshot and filters by id; rows and items are never rebuilt.
  • Relm4 is gone: the dependency, relm4_bridge, the relm4 DeliverInput impls and clippy bans, the export dialog's re-exports, and the docs. ADR 0003 is superseded by 0012.
  • Plurals: ngettext/ngettext_f take the full count (u32, u64 or usize) through g_dngettext. A count past unsigned long keeps its last six digits, as the gettext manual says. plural_count and 35 u32::try_from(n).unwrap_or(u32::MAX) call sites are gone.
  • Text views: one text_view_teardown::release drops the input method and the buffer when the editor, source dialog, change review, structure SQL, row detail value or assistant composer closes. Measured: with GTK 4.24.1 and ibus-gtk4 1.5.34, every text view stayed alive until its IM module was gtk-im-context-none. GtkSourceView 5.18 keeps a view with line numbers either way.
  • Alerts: workspace::respond answers with the close response when the window is destroyed with the alert open. libadwaita emits neither response nor closed then, so the future never resolved.
  • docs/toolkit-workarounds.md: one entry per toolkit workaround (tab decline, IBus fix(plugins): restore the build after MemberImportVisibility met two new files #2968, GtkSourceView !438, AdwAlertDialog.choose, gtk-rs ColumnViewCell focusable, ColumnViewCell::set_focusable and is_focusable never compile: gated on not(v4_12) gtk-rs/gtk4-rs#2393). Each has the defect, the versions, the test and when it goes. The code links to it.
  • Docs: storage.md no longer promises a Secret Service fallback without the Secret portal, which oo7 0.6 does not do. The crash hook comment, error-handling.md and troubleshooting.md no longer say stderr always reaches the journal or that every crash leaves a report. ADR 0037 corrects ADR 0005's sqlx fix(databend): read statements as the server does in Safe Mode #4044/feat(account): TablePro accounts replace license keys on macOS (M16) #4045 watch condition.

Test plan

  • tablepro:
    • session tab tests: drop outside keeps position and selection, foreign drop returns to its place, own-bar drop keeps the user's place, stray tab closes, a session closing while its tab is out logs no Adwaita critical.
    • i18n quantity tests, CSV dialog tests, Saved Queries tests, text view release tests, an alert whose window is destroyed.
  • tablepro-linux-platform: a missing Secret portal (PortalNotFound) maps to PortalUnavailable.
  • IBus reproducer (C, Ubuntu 26.10 and 26.04 containers): results above.
  • Screenshots from the dev container under Xvfb, before and after, light and dark.

Screenshots

CSV Import looks as before; its preview now reads off the GTK thread.

Before After
CSV Import, light CSV before light CSV after light
CSV Import, dark CSV before dark CSV after dark
Saved Queries, light Saved before light Saved after light
Saved Queries, dark Saved before dark Saved after dark
Search "people", light Search before light Search after light
Search "people", dark Search before dark Search after dark

@datlechin
datlechin enabled auto-merge (squash) November 5, 2026 10:24
…rds-fixes

# Conflicts:
#	linux/crates/app/src/ui/import_dialog.rs
#	linux/crates/app/src/ui/workspace/import_ledger.rs
#	linux/docs/decisions/README.md
…rds-fixes

# Conflicts:
#	linux/docs/decisions/README.md
@datlechin
datlechin merged commit d0bbd58 into main Nov 6, 2026
1 check passed
@datlechin
datlechin deleted the refactor/linux-standards-fixes branch November 6, 2026 03:03
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