Repository navigation
feat(desktop): distinguish processing/locked/recoverable from 'Untitled' - #7630
Conversation
Greptile SummaryThis PR replaces the single flat "Untitled Conversation" label with a six-state
Confidence Score: 3/5Safe to merge for the processing/locked/untitledEmpty display improvements, but the reprocess-a-failed-conversation flow leaves the Failed badge permanently stuck after a successful reprocess. The displayState switch evaluates status before examining structured.title, so a status==.failed conversation that gets a new title via reprocessing will never exit the .failed branch locally — the badge and wand button stay on-screen after a successful API call. The untitledRecoverable path works correctly because its status is already .completed. Everything else in the PR is solid. desktop/Desktop/Sources/MainWindow/Components/ConversationRowView.swift — the post-reprocess state update needs to write the conversation status (or replace the full object) in addition to the title. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ServerConversation] --> B{isLocked?}
B -- Yes --> L[.locked no reprocess CTA]
B -- No --> C{status}
C -- inProgress/processing/merging --> P[.processing no reprocess CTA]
C -- failed --> F[.failed canReprocess=true]
C -- completed --> D{structured.title non-empty?}
D -- Yes --> T[.titled no badge]
D -- No --> E{any segment with 5+ words?}
E -- Yes --> R[.untitledRecoverable canReprocess=true]
E -- No --> U[.untitledEmpty no badge no CTA]
F --> W[Wand button reprocessConversation API]
R --> W
W --> X[refreshed ServerConversation]
X --> Y[updateConversationTitle writes structured.title only]
Y --> Z1{was untitledRecoverable?}
Z1 -- Yes --> OK[displayState to .titled badge disappears]
Z1 -- No --> BUG[displayState still .failed badge persists]
Reviews (1): Last reviewed commit: "feat(desktop): distinguish processing/lo..." | Re-trigger Greptile |
…reprocess Addresses two comments on #7630: - P1: reprocessing a .failed conversation only updated structured.title. Since displayState checks status before title, the 'Failed' pill and reprocess CTA stayed stuck on the row indefinitely and the user could keep firing reprocess calls. Fix by replacing the whole conversation with the refreshed payload (new replaceConversation method on AppState — also picks up the updated overview, action items, status). The untitledRecoverable path already worked because its status was already .completed. - P2: the new one-tap reprocess path had no analytics. Existing conversationReprocessed signature requires an appId, so added a separate conversationReprocessedDefault event to keep the two funnels distinguishable in product metrics.
|
Great work on this @mdmohsin7 — this is a clean, well-scoped improvement to a core UX surface. What I like:
One thing before merge: Minor (non-blocking): the |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Approving — this is a clean, well-scoped improvement to a core UX surface.
The ConversationDisplayState model is the right abstraction. Collapsing four distinct "no title" causes (processing, locked, recoverable silent-failure, genuinely-empty) into one flat "Untitled Conversation" was genuinely misleading, and the precedence ordering (locked → status → title → recoverable heuristic) reads correctly.
A few things worth calling out:
- The Greptile review caught a real bug — reprocessing a
.failedconversation wouldn't clear the Failed badge because only the title was written. The fix infb35b88a(replacing the wholeServerConversationviareplaceConversationso status flips to.completed) is correct and well-documented. Good catch on the follow-through. - The ≥5-word recoverable heuristic is pragmatic and well-tested at the boundary. Keeping
untitledEmptyquiet instead of pushing reprocess on ambient noise is the right call. - Test coverage is solid — all six branches, the locked-takes-precedence invariant, and the multi-segment promotion edge case.
One thing before merge: GitHub reports this branch as having merge conflicts with main. Could you rebase/resolve when you get a chance? The code itself looks good to go once conflicts are cleared.
Minor (non-blocking): the catch in reprocessConversation() only logs — if reprocess fails the user gets no visible feedback. That's consistent with how updateTitle() handles errors in the same file, so not a regression, but worth a follow-up if you want to add a toast/alert later.
Automated approval dismissed: this PR falls into a category that should receive human maintainer/product/security judgment rather than formal auto-approval. No changes are being requested by this dismissal; prior automated feedback should be treated as an implementation review/positive signal only.
Conversations with no title were all rendered as the same 'Untitled
Conversation' string regardless of why — still processing, locked
behind a stale subscription, LLM silently failed, or just ambient
capture. Users had no way to tell which, and no inline path to
recover the recoverable cases.
- New ConversationDisplayState on ServerConversation collapses
status/isLocked/structured.title into one of: titled, processing,
locked, untitledRecoverable, untitledEmpty, failed.
- New ConversationStatusBadge pill renders the right cue inline next
to the row/header title (Processing/Locked/Failed/Needs reprocess).
- Placeholder titles render in textTertiary so they read as secondary
text instead of pretending to be a real title.
- Untitled-but-recoverable rows expose a one-tap reprocess affordance
(inline hover button + context-menu entry) that calls the existing
POST /v1/conversations/{id}/reprocess. Empty rows don't, to avoid
burning LLM tokens on ambient/accidental capture.
- ConversationDetailView header swaps its bespoke status badge for the
shared component so all four cases render consistently.
Tests cover the displayState heuristic across the six branches incl.
the locked-takes-precedence and recoverable-vs-empty edge cases.
…reprocess Addresses two comments on #7630: - P1: reprocessing a .failed conversation only updated structured.title. Since displayState checks status before title, the 'Failed' pill and reprocess CTA stayed stuck on the row indefinitely and the user could keep firing reprocess calls. Fix by replacing the whole conversation with the refreshed payload (new replaceConversation method on AppState — also picks up the updated overview, action items, status). The untitledRecoverable path already worked because its status was already .completed. - P2: the new one-tap reprocess path had no analytics. Existing conversationReprocessed signature requires an appId, so added a separate conversationReprocessedDefault event to keep the two funnels distinguishable in product metrics.
fb35b88 to
3ea42a6
Compare
undivisible
left a comment
There was a problem hiding this comment.
Rebased onto main after the desktop/macos move. Same ConversationDisplayState + badge + reprocess CTA. Local UI only.
Summary
Desktop was collapsing four distinct "why does this conversation have no title?" cases into one flat "Untitled Conversation" label, with no inline path to recover. This PR splits them apart and adds a one-tap reprocess affordance for the recoverable cases.
Before
Every row with an empty
structured.titlelooked the same — whether the conversation was still processing, locked behind a stale subscription, the LLM had silently failed, or it was just 2 seconds of ambient noise. Users couldn't tell which, and the only way to recover the silent-failure case was the "Reprocess with App" submenu deep in the detail view.After
ConversationDisplayStateonServerConversationreadsstatus,isLocked, andstructured.titletogether → one oftitled/processing/locked/untitledRecoverable/untitledEmpty/failed.ConversationStatusBadgepill renders inline next to the title:Processing(pulsing dot, info color)Locked(lock icon, warning color)Failed(warning icon, error color)Needs reprocess(wand icon, info color) — only on the recoverable casetextTertiaryso they read as secondary text rather than impersonating a real title.untitledRecoverableandfailedrows expose a one-tap reprocess button on hover, plus a "Reprocess Title & Summary" entry in the context menu. Calls existingPOST /v1/conversations/{id}/reprocessvia a new no-app overload onAPIClient.untitledEmptyrows (no transcript or only a tiny first segment) stay quiet — surfacing reprocess there would just burn LLM tokens on ambient capture.ConversationDetailViewheader swaps its bespoke status badge for the shared component so all four states render consistently.Test plan
ConversationDisplayStateTestscovers all six branches incl. locked-takes-precedence and the recoverable-vs-empty heuristic (≥5 words in at least one segment).Notes
displayConversation.titleaccessor preserved (exports / log lines / copy-to-clipboard still want a single plain string). UI surfaces should preferdisplayTitle.