fix(history): add scoped operation log filtering - #2696
Conversation
dd1fe4c to
adf283c
Compare
openai0229
left a comment
There was a problem hiding this comment.
Blocking: the new UI sends , but the backend drops it before storage. has the field, while does not, so MapStruct cannot carry it through; then filters only datasource/database/schema/search text. As a result, the Output request for and SQL Audit request for still query the same mixed stream.\n\nPlease add the operation type to the domain request, propagate it through the converter, filter it before pagination in local storage, and cover the separation with a backend test. The existing scope/search filtering and stale-response protection otherwise look sound.
Superseded by a corrected review because shell quoting corrupted the submitted text.
openai0229
left a comment
There was a problem hiding this comment.
Blocking: the new UI sends operationType, but the backend drops it before storage. OperationLogQueryRequest has the field, while OpsOperationLogPageQueryRequest does not, so MapStruct cannot carry it through; LocalWorkspaceStorage.operationLogList then filters only datasource/database/schema/search text. As a result, the Output request for SQL_EXECUTE and SQL Audit request for SQL_AUDIT still query the same mixed stream.
Please add the operation type to the domain request, propagate it through the converter, filter it before pagination in local storage, and cover the separation with a backend test. The existing scope/search filtering and stale-response protection otherwise look sound.
# Conflicts: # chat2db-community-client/package.json # chat2db-community-client/src/hooks/useSelectDatabase.ts # chat2db-community-client/src/pages/main/organization/components/SQLAudit/index.tsx # chat2db-community-client/src/pages/main/organization/components/SQLAudit/style.ts
Filters operation history by scope and search before pagination; adds filters and debounced search to Output and SQL Audit views; and prevents stale responses from overwriting current state. Validated by fork frontend/backend CI and Java/JavaScript CodeQL. Fixes #2241.