Skip to content

Keep sessions of types this version cannot read - #283

Merged
5cript merged 2 commits into
mainfrom
feat/keep-unknown-config-entries
Oct 28, 2026
Merged

5cript merged 2 commits into
mainfrom
feat/keep-unknown-config-entries

Conversation

@5cript

@5cript 5cript commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Part of FTP support (#260).

Sessions of an engine type this version does not know, such as ftp written by a newer version, are now kept instead of failing the whole load. This is so that versions from here on out don't delete session types created by later versions.

  • Such sessions, and sessions without a type, are kept as JSON in State::unreadSessions and written back on every save, unless a session of this version took their name.
  • The frontend receives them with the state and sends them back. Every frontend save now loads the state first: leaving a session in Settings, adding, deleting, renaming and copying sessions, and the theme toggle.
  • A load warning (SessionsKeptUnread) names the kept sessions, again only when they change.
  • One lookup, terminalEngineTypeFromName, decides which engine types are known, and variantDecide uses it too.
  • Only whole sessions are kept: unknown members inside other sessions or config objects are still dropped.

@5cript
5cript changed the base branch from feat/ftp to main October 28, 2026 20:35
@5cript 5cript changed the title Kept config entries this version cannot read, including unknown session types Keep config entries this version cannot read. Oct 28, 2026
@5cript 5cript changed the title Keep config entries this version cannot read. Keep config entries this version cannot read Oct 28, 2026
@5cript
5cript enabled auto-merge (rebase) October 28, 2026 21:32
@5cript
5cript disabled auto-merge October 28, 2026 22:09
@5cript 5cript changed the title Keep config entries this version cannot read Keep sessions of types this version cannot read Oct 28, 2026
…ad warning

- A session of an unknown or missing engine type no longer fails the whole load; it is kept whole
- State::unreadSessions holds them: from_json sets them aside, to_json writes them back unless a session took the name
- The frontend receives them with the state and sends them back with every save
- One engine type lookup through boost::describe::enum_from_string, variantDecide switches over the enum
- A load warning names the kept sessions, again only when they change
… are kept

- Leaving a session in Settings, adding, deleting, renaming and copying sessions and the theme toggle saved the cache
- They now load, apply their change to the loaded state and save, like the main Settings save already did
@5cript
5cript force-pushed the feat/keep-unknown-config-entries branch from 91846b6 to 278ff54 Compare October 28, 2026 23:07
@5cript
5cript enabled auto-merge (rebase) October 28, 2026 23:16
@5cript
5cript merged commit 399382c into main Oct 28, 2026
3 checks passed
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