Skip to content

feat: UX improvements#251

Merged
Flo0806 merged 4 commits intomainfrom
feat/ux-improvements
Mar 16, 2026
Merged

feat: UX improvements#251
Flo0806 merged 4 commits intomainfrom
feat/ux-improvements

Conversation

@Flo0806
Copy link
Contributor

@Flo0806 Flo0806 commented Mar 16, 2026

Closes #250

Summary by CodeRabbit

  • New Features

    • Emits claim events from the claim flow to surface status updates.
    • New server endpoint to invalidate a work-item detail cache; PR creation can trigger invalidation for a related work item.
  • UI/UX Improvements

    • Repo card clicks now navigate to the repository page.
    • Removed the "View PR" button from the claim flow.
    • Work item rows show linked PR/issue overlay icons; comment headers show source-type icons.
    • Rate limit indicator updates live.
  • Localization

    • Added labels for work item sources and types; removed unused "viewPr" label.
  • Performance

    • Smoother rocket animation and improved work-item sync via cache invalidation.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 625298a1-5a3c-46e9-a675-109e394c7b6b

📥 Commits

Reviewing files that changed from the base of the PR and between 5b6a4e0 and b8ec808.

📒 Files selected for processing (2)
  • app/components/timeline/CommentCard.vue
  • server/api/repository/[owner]/[repo]/work-items/[id]/invalidate.post.ts

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Work Item Type & Source Indicators
app/components/repo/RepoWorkItemRow.vue, app/components/timeline/CommentCard.vue, i18n/locales/en.json, i18n/locales/de.json, i18n/schema.json
Add overlay icons and tooltips indicating linked PR/issue relationships; add workItems.source and workItems.type i18n keys and remove obsolete viewPr.
Repo Navigation
app/components/repo/RepoCard.vue
Change card click to navigate to repository detail page; remove useIssueStore() and navigateToIssues() usage.
Claim Flow & Event Handling
app/components/issue/ClaimFlow.vue, app/components/work-item/WorkItemHeader.vue
Emit claimed from ClaimFlow when PR creation/push result includes a PR; remove the "View PR" button; WorkItemHeader forwards event as ciStatusChanged.
Polling & Server Cache Invalidation
app/composables/useWorkItemPolling.ts, server/api/repository/[owner]/[repo]/work-items/[id]/invalidate.post.ts
Add POST /invalidate endpoint for work-item detail and call it from polling trigger() before fetching to ensure fresh data.
PR Creation & Pending PR UI
server/api/pull-requests/create.post.ts, app/components/repo/PendingPrBanner.vue
Accept optional workItemId in PR creation request; PendingPrBanner supplies workItemId when present; backend invalidates work-item detail cache after PR creation if provided.
Utilities, Animation & UI Ticker
app/composables/useRocketBlast.ts, app/components/ui/RateLimitIndicator.vue
Add double requestAnimationFrame to rocket animation; RateLimitIndicator uses a reactive 30s ticker to update reset label.
Minor Cleanup
server/api/pull-requests/create.post.ts
Remove unused _login alias when reading session token.

Sequence Diagram

sequenceDiagram
    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
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly Related PRs

Poem

🐰 I hopped through code with a curious cheer,
Badges and tooltips now whisper clear,
Cache cleared with a thump before fresh data's run,
Rockets blink twice — then the animation's done,
Repos and items all shine in the sun.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete and only contains 'Closes #250' without following the required template structure for summary, type of change, checklist, or screenshots. Complete the description following the template: add a summary of changes, mark the type of change, confirm i18n updates were added, and confirm no breaking changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'feat: UX improvements' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes in the changeset. Make the title more specific by highlighting a primary change, such as 'feat: add work item type indicators and improve cache invalidation' or 'feat: enhance UX with type indicators and repo navigation'.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed All primary objectives from issue #250 are implemented: work item type indicators with tooltips [#250], repo navigation changes [#250], cache invalidation via new endpoint [#250], ClaimFlow improvements [#250], rate limit timer update [#250], and cleanup of unused _login [#250].
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #250 objectives; no out-of-scope modifications detected in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ux-improvements
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between fa0ef39 and 9b1dbf2.

📒 Files selected for processing (13)
  • app/components/issue/ClaimFlow.vue
  • app/components/repo/RepoCard.vue
  • app/components/repo/RepoWorkItemRow.vue
  • app/components/timeline/CommentCard.vue
  • app/components/ui/RateLimitIndicator.vue
  • app/components/work-item/WorkItemHeader.vue
  • app/composables/useRocketBlast.ts
  • app/composables/useWorkItemPolling.ts
  • i18n/locales/de.json
  • i18n/locales/en.json
  • i18n/schema.json
  • server/api/pull-requests/create.post.ts
  • server/api/repository/[owner]/[repo]/work-items/[id]/invalidate.post.ts

Comment on lines +74 to 75
await requestFetch(invalidateUrl.value, { method: 'POST' }).catch(() => null)
const fresh = await requestFetch<WorkItemDetail>(fetchUrl.value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Suggested change
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.

Comment on lines +1351 to +1380
"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
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

@Flo0806 Flo0806 merged commit 8bad813 into main Mar 16, 2026
8 of 9 checks passed
@Flo0806 Flo0806 deleted the feat/ux-improvements branch March 16, 2026 11:38
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.

feat: UX improvements — work item type indicators, repo navigation, cache invalidation

1 participant