Skip to content

fix: restore HTTP copying and simplify SQL Favorites - #424

Open
Pika-Yalei wants to merge 1 commit into
mainfrom
fix/ai_copy_sql_favorites
Open

Pika-Yalei wants to merge 1 commit into
mainfrom
fix/ai_copy_sql_favorites

Conversation

@Pika-Yalei

Copy link
Copy Markdown
Contributor

Summary

AI text-copy actions fail over non-loopback HTTP because they bypass the shared clipboard fallback. SQL Favorites also replace and bind the entire query instead of inserting reusable SQL snippets.

  • Route AI message, reply, and SQL copying through the shared HTTP-compatible text copier, retain session-access checks, and show success only after copying succeeds. Use one Monaco entry point to guard WebKit clipboard setup when the required browser APIs are unavailable.
  • Insert favorites at the cursor or replace only the selection, with undo/redo support. Remove favorite-specific dirty state, tab associations, and close/discard prompts while preserving ordinary query drafts.
  • Keep one save icon with Save as new favorite and Save to existing favorite. The latter uses version checks and defaults to the current query's most recently inserted favorite; users can change the target. Each query remembers that insertion independently across refreshes.
  • Remove AI conversation image sharing, its dedicated rendering dependency, assets, and translations. Move shared toast close buttons inside their containers and remove the circular border.
  • Update reusable browser regression procedures. Release notes are unchanged.

Related Issues

Closes #417
Closes #418

Test Plan (Required)

  • Not tested (explain why below)
  • Unit tests
  • Integration tests
  • Frontend lint / build
  • Backend build
  • Manual verification

Details:

  • npm run lint -- --no-fix: passed.
  • npm run check-i18n: passed with the changes staged; changed component locale references were also checked directly in both languages.
  • npm run test:unit -- --runInBand: 2 suites and 8 tests passed.
  • cd package && ./all_build.sh web: passed after the final source change. Restarted DmAloneLauncher through IDEA and confirmed startup and /healthcheck readiness.
  • Built-in browser checks covered LAN HTTP and localhost text copying, multiline SQL and reply contents, favorite insertion and selection replacement, undo/redo, explicit saving, version conflicts, per-query defaults, tab switching, refresh persistence, and removed sharing entries. No SQL was executed.
  • Verified toast close placement, mouse and keyboard dismissal, automatic dismissal, and responsive layouts at 1440x900, 1024x768, and 390x844.
  • Isolated checks covered failed insertion, delayed responses, off-page default lookup, deleted favorites, datasource-type mismatches, and clipboard-service capability guards.
  • Coverage limits: Safari/WebKit runtime and every read-only/Diff business entry were not exercised in the browser; capability guards and shared import paths were verified separately.

Checklist

  • The PR title clearly describes the change.
  • The change follows the repository coding standards.
  • Documentation was updated when behavior or usage changed.
  • Tests were added or updated for behavior changes.
  • I confirmed that generated files, dependency directories, logs, and local build artifacts are not included.

Use shared clipboard compatibility, insert reusable SQL favorites without dirty-document tracking, and keep explicit save targets independent from queries. Remove AI image sharing and keep toast close buttons inside their containers. Refs #417 and #418.
@Pika-Yalei
Pika-Yalei requested a review from a team October 21, 2026 02:52
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.

Make SQL Favorites insert snippets without unsaved-edit tracking AI assistant text-copy actions fail over LAN HTTP

1 participant