Skip to content

fix(MULTIPLA-002-2): 2 review findings in use-tickets-list.ts - #1874

Draft
flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/multipla-002-2-034aa495-59051284
Draft

fix(MULTIPLA-002-2): 2 review findings in use-tickets-list.ts#1874
flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/multipla-002-2-034aa495-59051284

Conversation

@flamingo

@flamingo flamingo Bot commented Aug 24, 2026

Copy link
Copy Markdown

Closes 2 review findings in openframe-frontend-core/src/components/tickets/hooks/use-tickets-list.ts.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

# Fix confidence Finding Location
1 🔴 45 low — review closely Ticket query keys are inline string arrays, not imported from a central query-keys module openframe-frontend-core/src/components/tickets/hooks/use-tickets-list.ts:92
2 🟢 95 high Duplicated block comment explaining isLoading rationale in use-tickets-list.ts openframe-frontend-core/src/components/tickets/hooks/use-tickets-list.ts:130

What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.


Run: https://product-hub.flamingo.so/admin/code-review
Run id: 59051284-b3d6-4391-892c-38c8737386e1

Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.

@flamingo

flamingo Bot commented Aug 24, 2026

Copy link
Copy Markdown
Author

🦩 What this fix changed, finding by finding

2 finding(s) fixed in this draft. (Inline placement was rejected by GitHub for this PR.)

🔴 1. Ticket query keys are inline string arrays, not imported from a central query-keys moduleopenframe-frontend-core/src/components/tickets/hooks/use-tickets-list.ts:92
In useTicketsList, replaced the inline queryKey: ['tickets', 'self', identityKey, search, statusFilter, page, pageSize] array with a call to a new ticketsListQueryKey(...) helper imported from ../query-keys. This file cannot see or create the sibling consumers (TicketCenter's removeTicketFromCache, useTicketEngagements, TicketLiveProvider) that also need to import from the same module, so the shared module openframe-frontend-core/src/components/tickets/query-keys.ts does not exist yet and must be created (exporting ticketsListQueryKey, a base ['tickets'] prefix constant, plus ticketEngagementsQueryKey and any others) for this to compile. This is the smallest real change achievable within this single file; the risk is a build break until that module is added and the other files are updated to match, which is out of scope per the instructions but necessary for the finding to be fully resolved.

🤖 Prompt for AI agents
In openframe-frontend-core/src/components/tickets/hooks/use-tickets-list.ts around line 92, review and complete this code-review fix: Ticket query keys are inline string arrays, not imported from a central query-keys module.
What the draft fix changed: In `useTicketsList`, replaced the inline `queryKey: ['tickets', 'self', identityKey, search, statusFilter, page, pageSize]` array with a call to a new `ticketsListQueryKey(...)` helper imported from `../query-keys`. This file cannot see or create the sibling consumers (`TicketCenter`'s `removeTicketFromCache`, `useTicketEngagements`, `TicketLiveProvider`) that also need to import from the same module, so the shared module `openframe-frontend-core/src/components/tickets/query-keys.ts` does not exist yet and must be created (exporting `ticketsListQueryKey`, a base `['tickets']` prefix constant, plus `ticketEngagementsQueryKey` and any others) for this to compile. This is the smallest real change achievable within this single file; the risk is a build break until that module is added and the other files are updated to match, which is out of scope per the instructions but necessary for the finding to be fully resolved.
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.

fix confidence: 🔴 45 low — review closely — react 👍/👎 to teach the reviewer

🟠 2. Duplicated block comment explaining isLoading rationale in use-tickets-list.tsopenframe-frontend-core/src/components/tickets/hooks/use-tickets-list.ts:130
Removed the duplicated second copy of the loading-state-truth block comment directly above isLoading in useTicketsList's return statement, keeping only one copy of the explanatory comment. No logic changed.

🤖 Prompt for AI agents
In openframe-frontend-core/src/components/tickets/hooks/use-tickets-list.ts around line 130, review and complete this code-review fix: Duplicated block comment explaining isLoading rationale in use-tickets-list.ts.
What the draft fix changed: Removed the duplicated second copy of the loading-state-truth block comment directly above `isLoading` in `useTicketsList`'s return statement, keeping only one copy of the explanatory comment. No logic changed.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 95 high — react 👍/👎 to teach the reviewer

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.

0 participants