[codex] fix(history): preserve full SQL behind previews - #2311
Merged
openai0229 merged 2 commits intoJul 28, 2026
Merged
Conversation
3 tasks
openai0229
marked this pull request as ready for review
July 28, 2026 12:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes #2310
Summary
Operation-log previews previously truncated the same
OperationLoginstances held by local storage. After a user opened the history list, fetching an entry's details returned the shortened SQL until the backend restarted.This change copies each operation log before preparing its 200-character preview. The list response keeps its existing truncation and
more=truebehavior, while the stored object and subsequent detail response retain the full SQL. A focused regression test covers the list-then-detail sequence and verifies that preview and storage objects are independent.Affected surfaces
Verification
Tests run: 1, Failures: 1, Errors: 0; the failure showed that the preview and stored log were the same instance.mvn -B -f chat2db-community-server/pom.xml -pl :chat2db-community-domain-core -am -Dmaven.test.skip=false -DskipTests=false -Dtest=OpsOperationLogQueryServiceImplTest -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.test.failure.ignore=false test->Tests run: 1, Failures: 0, Errors: 0, Skipped: 0; reactorBUILD SUCCESS.mvn -B -f chat2db-community-server/pom.xml -pl :chat2db-community-domain-core -am -Dmaven.test.skip=true package-> all 7 reactor modules succeeded. Tests were explicitly skipped in this packaging pass and are covered by the focused command above.git diff --check-> passed.Risk and compatibility
moreflag, ordering, and pagination metadata are preserved.Reviewer map
OpsOperationLogQueryServiceImpl.operationLogPreviewList;preparePreviewnow copies the input before truncation.getOperationLog.137b2874; there is no data migration or configuration change.Contributor declaration
AI assistance: OpenAI Codex traced the affected call path with CodeGraph, authored the focused implementation and regression test, and ran the verification commands reported above.