Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds UI indicators for work-item type/source, changes repo card navigation to repo detail, removes "View PR" from claim flow and emits a claimed event, introduces server-side work-item invalidate endpoint and client-side invalidation before polling, tweaks rocket animation, and makes rate-limit ticker reactive; adds i18n keys. Changes
Sequence DiagramsequenceDiagram
participant Client
participant Poll as useWorkItemPolling
participant InvalidateAPI as /invalidate
participant FetchAPI as DataFetch
participant ServerCache
Client->>Poll: trigger()
Poll->>InvalidateAPI: POST /repository/{owner}/{repo}/work-items/{id}/invalidate
InvalidateAPI->>ServerCache: invalidate work item detail cache
ServerCache-->>InvalidateAPI: { ok }
InvalidateAPI-->>Poll: { invalidated: true }
Poll->>FetchAPI: GET work-item data
FetchAPI->>ServerCache: read (miss after invalidate)
ServerCache-->>FetchAPI: fresh data
FetchAPI-->>Poll: work-item data
Poll-->>Client: updated data
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/components/timeline/CommentCard.vue`:
- Around line 129-135: The source badge rendering can be incorrect when the
optional prop/variable source is undefined; update the CommentCard.vue render
logic around the UTooltip/ UIcon block to explicitly guard on source (e.g.,
check source !== undefined/null) before rendering the badge, and when source is
absent either hide the UTooltip/ UIcon entirely or render a neutral/fallback UI
state; locate the conditional that currently uses source === 'pull' and change
it to a guarded conditional (e.g., only evaluate source === 'pull' if source is
defined) so provenance isn't defaulted to "issue".
In `@app/composables/useWorkItemPolling.ts`:
- Around line 74-75: The invalidate POST currently swallows errors and proceeds
to fetch, risking serving stale cached data; update the logic around
requestFetch(invalidateUrl.value) so failures are handled before calling
requestFetch(fetchUrl.value) — e.g., await requestFetch(invalidateUrl.value)
inside a try/catch and on error either retry or propagate/abort (do not continue
to the fetch), or alternatively ensure the subsequent
requestFetch(fetchUrl.value) uses a cache-bypass (unique query param or no-cache
header) if invalidate failed; reference requestFetch, invalidateUrl, and
fetchUrl to locate and change the code.
In `@i18n/schema.json`:
- Around line 1351-1380: The JSON schema is out of sync: remove the obsolete key
"cli.viewPr" from the schema and ensure the newly added objects under
"workItems.source" and "workItems.type" are present and correctly defined
(objects with the listed "issue", "pr", and the "issueWithPr"/"prWithIssue"
properties and "additionalProperties": false); search for any other occurrences
of "cli.viewPr" (notably around the other reported region) and delete them so
the schema matches the current locales and CI expectations.
In `@server/api/repository/`[owner]/[repo]/work-items/[id]/invalidate.post.ts:
- Around line 1-8: The handler calls invalidateWorkItemDetailCache but that
function is not imported; update the imports at the top to include
invalidateWorkItemDetailCache from the same module as
getRepoParams/getSessionToken (the module referenced as
'~~/server/utils/github') so the call in the defineEventHandler will resolve;
ensure the import line includes invalidateWorkItemDetailCache alongside
getRepoParams and getSessionToken to prevent a ReferenceError.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 33f3882e-744f-4842-9150-eb62e30c592f
📒 Files selected for processing (13)
app/components/issue/ClaimFlow.vueapp/components/repo/RepoCard.vueapp/components/repo/RepoWorkItemRow.vueapp/components/timeline/CommentCard.vueapp/components/ui/RateLimitIndicator.vueapp/components/work-item/WorkItemHeader.vueapp/composables/useRocketBlast.tsapp/composables/useWorkItemPolling.tsi18n/locales/de.jsoni18n/locales/en.jsoni18n/schema.jsonserver/api/pull-requests/create.post.tsserver/api/repository/[owner]/[repo]/work-items/[id]/invalidate.post.ts
| await requestFetch(invalidateUrl.value, { method: 'POST' }).catch(() => null) | ||
| const fresh = await requestFetch<WorkItemDetail>(fetchUrl.value) |
There was a problem hiding this comment.
Don’t ignore invalidate failures before the refresh fetch.
If /invalidate fails, the subsequent fetch can still return stale cached data, which defeats this trigger path’s goal.
Suggested fix
- await requestFetch(invalidateUrl.value, { method: 'POST' }).catch(() => null)
+ await requestFetch(invalidateUrl.value, { method: 'POST' })
const fresh = await requestFetch<WorkItemDetail>(fetchUrl.value)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| await requestFetch(invalidateUrl.value, { method: 'POST' }).catch(() => null) | |
| const fresh = await requestFetch<WorkItemDetail>(fetchUrl.value) | |
| await requestFetch(invalidateUrl.value, { method: 'POST' }) | |
| const fresh = await requestFetch<WorkItemDetail>(fetchUrl.value) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@app/composables/useWorkItemPolling.ts` around lines 74 - 75, The invalidate
POST currently swallows errors and proceeds to fetch, risking serving stale
cached data; update the logic around requestFetch(invalidateUrl.value) so
failures are handled before calling requestFetch(fetchUrl.value) — e.g., await
requestFetch(invalidateUrl.value) inside a try/catch and on error either retry
or propagate/abort (do not continue to the fetch), or alternatively ensure the
subsequent requestFetch(fetchUrl.value) uses a cache-bypass (unique query param
or no-cache header) if invalidate failed; reference requestFetch, invalidateUrl,
and fetchUrl to locate and change the code.
| "source": { | ||
| "type": "object", | ||
| "properties": { | ||
| "issue": { | ||
| "type": "string" | ||
| }, | ||
| "pr": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "type": { | ||
| "type": "object", | ||
| "properties": { | ||
| "issue": { | ||
| "type": "string" | ||
| }, | ||
| "pr": { | ||
| "type": "string" | ||
| }, | ||
| "issueWithPr": { | ||
| "type": "string" | ||
| }, | ||
| "prWithIssue": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, |
There was a problem hiding this comment.
Schema is out of sync with locale changes (CI blocker).
workItems.source/type was added, but cli.viewPr still exists in schema even though it was removed from locales, which matches the pipeline failure.
🛠️ Proposed fix
"nothingToPush": {
"type": "string"
- },
- "viewPr": {
- "type": "string"
}Also applies to: 2095-2097
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@i18n/schema.json` around lines 1351 - 1380, The JSON schema is out of sync:
remove the obsolete key "cli.viewPr" from the schema and ensure the newly added
objects under "workItems.source" and "workItems.type" are present and correctly
defined (objects with the listed "issue", "pr", and the
"issueWithPr"/"prWithIssue" properties and "additionalProperties": false);
search for any other occurrences of "cli.viewPr" (notably around the other
reported region) and delete them so the schema matches the current locales and
CI expectations.
Closes #250
Summary by CodeRabbit
New Features
UI/UX Improvements
Localization
Performance