Repository navigation
feat(core): store parity for the Mac library (ids, icons, SSH/TLS fields, batch API) - #4590
Merged
Merged
Conversation
…wrote and deleted (ADR 0060)
…, from the third review
datlechin
enabled auto-merge (squash)
November 25, 2026 23:03
…arity # Conflicts: # core/crates/storage/src/query_history/mod.rs # core/crates/storage/src/saved_queries/deletion.rs # core/crates/storage/src/saved_queries/folders.rs # core/crates/storage/src/saved_queries/mod.rs # core/crates/storage/src/saved_queries/ordering.rs # windows/src/TablePro.Interop/Generated/tablepro_ffi.cs
…es by record id in the journal
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Core store parity for the Mac library (lane K4c of the full-sync work), so the Mac's library moves into
connections.jsonwithout losing ids or values.Core and storage
ConnectionStore::replace_library_blocking(LibraryWrite { connections, groups, tags, favorites }): the whole library in one commit and one journal call, ids and values as given, a repeated id refused (storage.repeated_id), entries this build cannot read kept unless the write names them.GroupTree::parent,ConnectionList::group_of); a missing tag reads as none;delete_tag_blockingtakes the tag off its connections itself.ConnectionGroupName::new,ConnectionTagName::new, the FFI save and rename, the Linux form) and file imports still clean them;shown()andsame_namecompare and display the cleaned form.LibraryIcon(wasGroupIcon) on connections too: a named icon or an SF Symbol. A named connection icon is still written as its id string.SavedSshConfig:enabled(settings kept while off),SshJumpHosthops (the legacyuser@host:portstring still read and written while a hop has no id, auth or key),SavedSshAuth::None,kept_key_path,agent_socket,totp,remote_file,unknown.SshProfile's unknown keys move into itsssh.TlsMode::VerifyCa, refused byTlsConfig::validateand listed by no driver; matches that reach it anyway check the name too.TlsConfig.unknown.AiPolicy::AppDefaultwithor_app_default;ConnectionTag.is_preset;ConnectionTag.coloroptional.SafeModeLevelis the Mac's six levels: Silent, Alert, AlertFull, SafeMode, SafeModeFull, ReadOnly. The first three keep their stored names (off,confirm_writes,read_only).SafeModeLevel::enforcedrounds up, never down, to the three a session runs today, so AlertFull, SafeMode and SafeModeFull run as Read-Only on Linux and Windows;resolve_savedandSession::set_safe_moderun the enforced level.ChangeJournal::changed(&[JournalEntry])names, per kind, the records each commit wrote and deleted (RecordRef: UUID, team item, table, database), for every store; saved queries, folders and history entries go by therecord_idfeat(core): UUID record ids for synced kinds #4587 gave them, renumbered siblings included.SshDestinationProblem::JumpHostKey); a tunnel to a remote file is refused for every engine (ConfigError::RemoteFileOverSsh);noneauth dials as the agent, since both transports try none first.TlsMode::at_least_in: a form shows a mode its engine does not offer as the weakest offered one at least as strict (Verify CA as Verify full), never the engine's weaker default.TlsMode::edited: saving the mode it shows keeps the stored one.list_connectionsgives the Safe Mode level a session runs.FFI
ConnectionLibrary::library_contents()andreplace_library(LibraryWriteRecord)withLibraryConnectionRecord { connection, details, device }; unknown keys, network options and route unknowns stay from the stored entry.ConnectionRecord.icon,.order;GroupRecord.icon;TagRecord.is_preset, optionalcolor;update_tagtakes an optional colour;SshSettings.enabled,.options(SshOptionsRecord),jump_hosts: Vec<SshJumpHostRecord>;TlsModeTag::VerifyCa;AiPolicyTag::AppDefault;SshAuthTag::None;SafeModeTagsix levels.parse_jump_hosts,jump_hosts_text,safe_mode_enforced,library_icon_for_symbol,library_icon_symbol.duplicatetoo.library_contentsgives them as stored.Linux
linux/docs/storage.mdupdated.Windows
safe_mode_enforced,VerifyCa, App Default as Ask, a switched-off tunnel as none, hops throughparse_jump_hostsandjump_hosts_text, tags with no colour (UpdateTagAsynctakes an optional colour).TlsModes.AtLeastIn), never the first in the list.Tests updated on purpose
catalog_changeandsafe_mode_gate: the gate tables cover six levels.connection_group,connection_tag, the names' stored-form tests: stored names are kept, not cleaned or refused.group_treecycle test: a cycle now reads at the top.a_crafted_tree_reads_without_cycles_strays_or_doubles,a_name_is_stored_as_given(wasa_rename_is_stored_as_the_list_shows_it),a_connection_names_each_tag_once_and_keeps_one_the_list_lacks,a_file_with_a_doubled_tag_reads_its_first_entry_and_keeps_a_namesake,a_tag_with_a_blank_name_is_kept_as_written, and the insert-after test's tag assertion: stored values are kept, not rewritten.a_mysql_read_script_with_delimiter_lines_runs_at_every_level_that_lets_reads_through: the Full levels ask before reads.CloudLibraryRecordsTestsinapple/Packages/TableProFFI: it saves at.silent, the level.offbecame.connect_formdriver-switch test: the default taken for a chosen mode stays chosen.a_renumbering_write_keeps_the_objects: a delete keeps the other entries' numbers; the move still renumbers.safe_mode_subtitle_follows_the_level_and_the_enforcementandeach_ai_policy_says_what_it_sends: they walk the levels and policies the pickers offer.Test plan
verify.sh --platform linux --jobs 3, on the merge with main: lint, build and every Meson suite pass, 9523 cases,tablepro-storageandtablepro-recordsamong them (macOS's SQLite 3.54 fails the history.db copy tests).cargo testfortablepro-coreandtablepro-mcp;verify.sh --platform windows corefortablepro-ffi, 389 cases.verify.sh --platform windows --jobs 4: build (the WinUI projects compile only), test 2507 cases, bindings match the library.apple/scripts/ci/check-connection-field-trust.pypasses.--adminbefore the CI queue, on Dat's rule of 2026-11-26 for this work (main's CI runs after the merge; red is fixed forward).