Skip to content

feat(workspace): name SQL on initial save - #2305

Merged
openai0229 merged 1 commit into
mainfrom
feat/2235-initial-saved-console-name
Jul 28, 2026
Merged

openai0229 merged 1 commit into
mainfrom
feat/2235-initial-saved-console-name

Conversation

@openai0229

Copy link
Copy Markdown
Contributor

Related issue

Closes #2235

Summary

  • Prompt for a non-empty saved SQL name on the first manual save of a Community SQL console.
  • Keep cancellation as a local draft, and publish the existing console id with the chosen name and current SQL only after confirmation.
  • Update the workspace tab title and saved status together after publication; later manual and automatic saves continue updating the same record without another prompt.
  • Add localized EN/ZH/JA/KO/ES copy and focused saved-console lifecycle coverage.

Affected surfaces

  • Frontend / Web
  • Backend / API / Storage
  • Database plugin / Driver
  • JCEF / Desktop packaging
  • CI / Build / Release
  • Documentation only

Verification

  • Commands and results:
    • yarn test:saved-console-lifecycle - passed.
    • yarn test:i18n - passed.
    • yarn lint - passed with zero warnings.
    • yarn run build:web:community --app_version=0.0.0 - passed; Webpack compiled successfully in 25.25 seconds.
    • git diff --check - passed.
  • Manual verification:
    • Live Community backend 10825/api/system returned 200 application/json.
    • Live Community Web proxy 8889/api/system returned 200 application/json.
    • 8889/workspace returned 200 text/html.
    • The hot-reload server compiled the changed source successfully.
  • UI evidence: N/A - the available browser controller reported no browser instance, so no automated click-through or screenshot was available.

Risk and compatibility

  • Public API or stored data: No API or storage schema change. Initial publication includes name in the existing saved-console update payload.
  • Database or driver compatibility: N/A - no database plugin or driver code changed.
  • Network, privacy, or security: N/A - no new network path or data collection.
  • Community / Local / Pro boundary: Community frontend only; Enterprise, Local, Pro, and Gateway sources are unchanged.
  • Backward compatibility: Existing saved consoles do not prompt. Later saves keep using the same console id and existing persistence flow.

Reviewer map

  • Start here: chat2db-community-client/src/components/SQLEditor/editor/SQLEditorWithOperation/index.tsx, then chat2db-community-client/src/components/SQLEditor/hooks/useSaveEditorData.ts.
  • Failure condition: First save does not prompt, cancellation publishes a record, confirmation creates a duplicate id, later saves prompt again, or the tab title/status diverges from the saved record.
  • Rollback or disable path: Revert commit 35a7bb83; no data migration or backend rollback is required.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: OpenAI Codex assisted with implementation, test coverage, verification, and PR preparation; the resulting diff and behavior were reviewed before submission.

@openai0229 openai0229 moved this to In Review in Chat2DB Community Jul 28, 2026
@openai0229
openai0229 merged commit 11958a3 into main Jul 28, 2026
17 checks passed
@openai0229
openai0229 deleted the feat/2235-initial-saved-console-name branch July 28, 2026 03:44
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Allow naming a saved SQL entry during the initial save

1 participant