Skip to content

feat: restore previous session connections and add start-maximized option#332

Open
GabrielMalava wants to merge 2 commits into
TabularisDB:mainfrom
GabrielMalava:feat/auto-connect-last-connection
Open

feat: restore previous session connections and add start-maximized option#332
GabrielMalava wants to merge 2 commits into
TabularisDB:mainfrom
GabrielMalava:feat/auto-connect-last-connection

Conversation

@GabrielMalava

Copy link
Copy Markdown

No description provided.

… restoration, and adding a way for the user to open the system in fullscreen.
@GabrielMalava GabrielMalava changed the title Feat/auto connect last connection feat: restore previous session connections and add start-maximized option Jun 18, 2026
@GabrielMalava

Copy link
Copy Markdown
Author

What

  • Session restore: on startup, reopen all connections that were open when the
    app was last closed, reactivating the last active one. Toggle in
    Settings → General → Startup ("Reopen Last Connections").
  • Start maximized: optional setting to open the window maximized on launch
    ("Start Maximized").

How

  • Backend persists last_open_connection_ids + last_active_connection_id and a
    start_maximized flag in config.json; the window is maximized in the Tauri
    setup hook.
  • Frontend persists the open-connection set and auto-connects on the Connections
    page, switching to the last active connection.

i18n

  • Added autoConnectLastConnection, startMaximized (+ descriptions) across all
    8 locales.

Comment thread src/pages/Connections.tsx
useEffect(() => {
if (autoConnectAttempted) return;
if (connections.length === 0) return;
autoConnectAttempted = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: autoConnectAttempted is set before checking the autoConnectLastConnection setting

If the user disables auto-connect (or it starts disabled), the flag is set to true anyway. If they later enable the setting in the same app session, the effect re-runs but is blocked by the already-set flag, so auto-connect never executes.

Move autoConnectAttempted = true; to after the settings.autoConnectLastConnection === false check.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/pages/Connections.tsx 103 autoConnectAttempted set before settings check, preventing auto-connect from working if the user toggles the setting on after it was initially off
Other Observations (not in diff)
  • src/contexts/DatabaseProvider.tsx (lines 779–790): The persistence effects intentionally skip null/empty states to avoid a startup race condition. This is a documented trade-off, but it also means intentionally closed connections are not cleared from the saved state.
Files Reviewed (15 files)
  • src-tauri/Cargo.lock
  • src-tauri/src/config.rs
  • src-tauri/src/lib.rs
  • src/components/settings/GeneralTab.tsx
  • src/contexts/DatabaseProvider.tsx
  • src/contexts/SettingsContext.ts
  • src/i18n/locales/de.json
  • src/i18n/locales/en.json
  • src/i18n/locales/es.json
  • src/i18n/locales/fr.json
  • src/i18n/locales/it.json
  • src/i18n/locales/ja.json
  • src/i18n/locales/ru.json
  • src/i18n/locales/zh.json
  • src/pages/Connections.tsx – 1 issue

Fix these issues in Kilo Cloud


Reviewed by kimi-k2.6-20260420 · 578,298 tokens

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