Skip to content

feat(frontend): add SQL output ordering and explicit follow mode - #1936

Merged
openai0229 merged 3 commits into
mainfrom
feat/1916-execution-output-order
Jul 23, 2026
Merged

openai0229 merged 3 commits into
mainfrom
feat/1916-execution-output-order

Conversation

@openai0229

@openai0229 openai0229 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Related issue

Closes #1916

Summary

  • Add persisted oldest-first/newest-first execution-group ordering while preserving statement order inside each execution.
  • Keep Output free of a persistent toolbar and group its right-click menu as copy; ordering plus follow; destructive clear.
  • Make follow-latest a real explicit toggle: a check means enabled, an order-aware edge arrow means disabled, and manual scrolling or ordering changes never mutate the setting.
  • Track the bottom edge for oldest-first and the top edge for newest-first after new records or layout-size changes while follow mode is enabled.
  • Cancel and identity-check deferred result-grid resize() work so page refresh cannot resize a released VTable instance.

Affected surfaces

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

Verification

  • Commands and results:
    • yarn test:execution-console - passed.
    • yarn test:sql-execution-log - passed.
    • yarn test:search-result-tab-selection - passed.
    • yarn lint:eslint - passed with zero warnings.
    • yarn build:web:community - passed.
    • git diff --check - passed.
    • Project knowledge lint - passed.
    • yarn test:i18n - all changed common.ts translations and source hashes pass; the command still reports only the existing es-ES/setting.ts and ko-KR/setting.ts stale source hashes reproduced from main.
  • Runtime verification:
    • The Community frontend hot-compiled each correction at http://localhost:8889.
    • The frontend and proxied /api/system endpoint returned HTTP 200.
    • Manual local testing exercised ordering, follow-state feedback, manual history scrolling, and repeated page refreshes; issues found during that testing were corrected in this update.

Risk and compatibility

  • Public API or stored data: no public API changes; adds only the namespaced local preference key chat2db.community.<runtime>.execution-console.order.v1.
  • Database or driver compatibility: N/A - execution and reducer data contracts are unchanged.
  • Network, privacy, or security: no new network calls or credential handling.
  • Community / Local / Pro boundary: changes only the Community client; Enterprise is unchanged.
  • Backward compatibility: oldest-first remains the default, existing records are not mutated, and existing copy, clear, and follow actions remain available from the context menu.
  • Lifecycle behavior: deferred VTable resize work is now cancelled on cleanup and skipped unless the forwarded ref still points to the same instance.

Reviewer map

  • Start with ExecutionConsole/index.tsx for grouped menu and explicit follow behavior.
  • Review executionConsolePreferences.ts for persisted ordering, execution-group reversal, and order-specific latest-edge targeting.
  • Review ResultSet/index.tsx for the refresh/unmount resize guard.
  • Failure conditions: newest-first reverses statements inside one execution; scrolling or ordering changes the follow toggle; disabled follow still auto-scrolls; or refresh calls resize() after VTable release.
  • Rollback path: revert this PR; the new local-storage preference becomes unused and does not affect older builds.

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, tests, review, and verification; the resulting diff and test evidence were reviewed before submission.

@openai0229 openai0229 changed the title feat(frontend): add SQL output ordering and reliable follow mode feat(frontend): add SQL output ordering and explicit follow mode Jul 23, 2026
@openai0229
openai0229 merged commit 6fffad2 into main Jul 23, 2026
14 of 15 checks passed
@openai0229
openai0229 deleted the feat/1916-execution-output-order branch August 5, 2026 03:16
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.

Add newest-first ordering and reliable follow mode to SQL execution output

1 participant