Skip to content

fix(result): stabilize sorting and edit actions - #2868

Merged
openai0229 merged 1 commit into
mainfrom
fix/result-set-sort-edit-actions
Sep 2, 2026
Merged

openai0229 merged 1 commit into
mainfrom
fix/result-set-sort-edit-actions

Conversation

@openai0229

Copy link
Copy Markdown
Contributor

Related issue

N/A - direct regression fix requested and verified locally.

Summary

  • Keep result-table sort, filter, refresh, and pagination requests inside the current result tab instead of creating additional result sets.
  • Preserve the base query and replace stale sort editor text so consecutive sorts emit one ORDER BY clause.
  • Make result edits observable while the cell editor is active, and commit the active editor before revert, preview, or submit actions.
  • Scope Cmd/Ctrl+S to result submission while focus is inside the result set, without triggering console save.
  • Allow update SQL generation for local SQL files that do not have a console ID.

Affected surfaces

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

Verification

  • Commands and results:
    • yarn install --frozen-lockfile - passed.
    • yarn lint - passed with zero warnings.
    • yarn test:result-set-ui - 38 tests passed.
    • yarn test:shortcut - passed.
    • yarn build:web:community --app_version=0.0.0 - passed, including all Community prebuild tests and production bundle verification.
    • mvn -B -f chat2db-community-server/pom.xml -pl :chat2db-community-web -am -Dmaven.test.skip=false -DskipTests=false -Dtest=DmlExecutionRequestValidationTest -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.test.failure.ignore=false test - 7 tests passed, zero failures/errors.
    • mvn -B clean package -Dmaven.test.skip=true -Dchat2db.finalName=chat2db-community -f chat2db-community-server/pom.xml -pl chat2db-community-start -am - passed; tests were explicitly skipped in this package command.
  • Manual verification:
    • Consecutive MySQL column sorts kept one result tab and one ORDER BY clause.
    • Sort, filter, refresh, and pagination replaced the active result instead of appending a result set.
    • Entering edit mode without changing the value kept edit actions disabled; changing a value enabled and highlighted revert, preview, and submit.
    • Revert restored short-four after editing it to short-.
    • Result-set Cmd+S produced one get_update_sql request and no console-save dialog; the final write endpoint was blocked during this verification.
    • Update SQL preview succeeded without a console ID.
  • UI evidence: N/A - interactive Playwright verification completed; generated screenshots and logs were removed from the source tree.

Risk and compatibility

  • Public API or stored data: consoleId is now optional only on select-result update/copy SQL generation requests; datasource and operation validation remain unchanged. No storage schema changes.
  • Database or driver compatibility: No plugin or driver implementation changed. SQL composition remains database-aware for relational and MongoDB result filtering/sorting.
  • Network, privacy, or security: No new network destination, credential handling, or permission path.
  • Community / Local / Pro boundary: Community source only. Local SQL files can now generate update SQL without a saved console context.
  • Backward compatibility: Existing console-backed requests remain valid; result-tab behavior changes only for follow-up operations on an existing result.

Reviewer map

  • Start here: ResultSet/index.tsx, ResultSetTable/index.tsx, ScreeningResult/index.tsx, and viewTablePagingModel.ts.
  • Failure condition: a follow-up sort/filter/page creates another result tab, emits duplicate sort SQL, edit actions activate before a value changes, revert does not restore the value, or result-set Cmd/Ctrl+S opens console save.
  • Rollback or disable path: revert this commit; there is no feature flag or storage migration.

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 diagnosis, implementation, review, regression tests, and local verification. All reported commands and manual checks were executed against the Community repository.

@openai0229
openai0229 requested review from a team and Aias00 as code owners September 2, 2026 11:18
@openai0229 openai0229 moved this to In Review in Chat2DB Community Sep 2, 2026
@openai0229
openai0229 merged commit 248d720 into main Sep 2, 2026
18 of 19 checks passed
@openai0229
openai0229 deleted the fix/result-set-sort-edit-actions branch September 2, 2026 11:42
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Sep 2, 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.

1 participant