Skip to content

Add opt-in Linux Quick View - #3973

Open
stackingrockss wants to merge 2 commits into
steipete:mainfrom
stackingrockss:feat/linux-mac-style-quick-view
Open

stackingrockss wants to merge 2 commits into
steipete:mainfrom
stackingrockss:feat/linux-mac-style-quick-view

Conversation

@stackingrockss

@stackingrockss stackingrockss commented Sep 25, 2026 •

Copy link
Copy Markdown

Summary

Adds the compact Linux Quick View as an opt-in surface without changing the default window. Ordinary launch and --usage still open the full Usage & Spend window. --quick-view opens the compact view explicitly; the tray's primary activation uses it only when the new compactQuickView preference is enabled (off by default, shown as Use compact Quick View from the tray). The tray menu retains an explicit Quick View action.

The compact view has Overview/provider tabs, the macOS provider icons, quota meters, reset/pace text, optional inline cost, and footer actions. Settings keeps the updated Linux layout. Provider fetching and authentication are unchanged. A cost scan starts on Quick View or Spending open, not on ordinary usage open. Inline provider cost is now labeled Cost across accounts. The Linux build action installs qt6-svg-dev for the qmake SVG module.

Refs #3971; this PR no longer depends on a decision to replace the default Linux window.

Pop!_OS screenshots

Captured with Qt 6.4.2 on Pop!_OS/COSMIC Wayland using the same synthetic Codex/Claude/Gemini usage and spending data. Before is the installed v0.61.0 UI; after is this PR. No personal account data appears.

Surface Before (v0.61.0) After (this PR)
Default usage (--usage) Full usage before Full usage remains the default
Settings Settings before Settings with opt-in preference off

Explicit Quick View after, plus refreshed Quick View and Settings captures in a dark theme.

Validation

  • Rebuilt the revised source with qmake6/make on Pop!_OS and exercised --usage, --quick-view, and --settings in the Wayland session with synthetic data; QML runtime logs showed no errors.
  • Linux runtime tests: 17 passed, including cost-scan behavior with the opt-in setting both off and on.
  • Linux packaging tests: 3 passed. Qt account-action tests: 3 passed.
  • Verified qt6-svg-dev is the Qt SVG development package installed on the Pop!_OS test host and supplying the qmake SVG module.
  • make test and make check were attempted in the agent container, where make is unavailable; the Pop!_OS host has make but not Swift/SwiftFormat/SwiftLint. The repository's macOS gates remain for CI.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed September 25, 2026, 2:25 PM ET / 18:25 UTC (Revision 2).

ClawSweeper review

What this changes

The branch adds a compact Linux usage window opened by an explicit command or an off-by-default tray preference, restyles Settings, bundles provider icons, and adds Qt SVG to the Linux build.

Merge readiness

⛔ Blocked before merge - 3 items remain

The owner’s requested opt-in direction is now reflected in the branch, and current main does not have this Quick View. One cost-display defect remains before merge.

Priority: P3
Reviewed head: e4cc6b82b01918fe8f730ee1eb9efc87204f9002

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Direct Linux screenshots and reported runtime checks support the opt-in behavior, while the cost-display defect still needs repair.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The changed Linux Qt windows are shown running on Pop!_OS with synthetic usage: captures show the full default window, the off-by-default Settings toggle, and the explicit Quick View after the change; the contributor reports exercising the command routes on Wayland. The new saved preference defaults to false, and older settings files inherit that default through the existing merge-on-load path, so no migration is needed.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The changed Linux Qt windows are shown running on Pop!_OS with synthetic usage: captures show the full default window, the off-by-default Settings toggle, and the explicit Quick View after the change; the contributor reports exercising the command routes on Wayland. The new saved preference defaults to false, and older settings files inherit that default through the existing merge-on-load path, so no migration is needed.
Evidence reviewed 9 items Owner direction: The owner described an explicit Quick View command and an off-by-default tray preference as the bounded adoption path.
Opt-in routing: Ordinary launch defaults to usage; tray activation selects Quick View only when compactQuickView is enabled.
Upgrade-compatible preference loading: The new preference defaults to false, and loading an older settings file overlays its known keys onto the defaults.
Findings 1 actionable finding [P2] Show cost refresh and coverage warnings in Quick View
Security None None.

How this fits together

The Linux desktop reads usage and local spending from the CodexBar CLI, then displays them through Qt windows and a tray icon. Settings and command-line requests determine which window opens.

flowchart LR
  A[CLI usage and spending] --> B[Linux desktop controller]
  C[Saved preferences] --> B
  D[Command or tray click] --> E{Choose window}
  B --> E
  E --> F[Full usage window]
  E --> G[Quick View]
Loading

Before merge

  • Show cost refresh and coverage warnings in Quick View (P2) - A failed cost scan leaves previous spending in desktop.spending and sets desktop.costError, but this block still presents the old amount without a warning. It also omits the spending row's incomplete-history caveat. Display those states beside the total so the compact view does not make stale or partial spending look current.
  • Resolve merge risk (P1) - Quick View can show retained or incomplete local spending as an ordinary current total because it omits refresh-failure and history-coverage caveats.
  • Complete next step (P2) - Show cost refresh failure and incomplete-history coverage beside Quick View totals, then add a focused retained-cost regression check.

Findings

  • [P2] Show cost refresh and coverage warnings in Quick View — Integrations/Linux/qml/QuickView.qml:355-370
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Code growth production net +720 lines, tests net +10 lines Most production growth builds the new Qt view and icon resources; the focused runtime test covers routing and cost-scan timing.

Merge-risk options

Maintainer options:

  1. Show cost caveats (recommended)
    Render the existing cost error and history-coverage state in Quick View and cover retained spending after a failed refresh.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Show cost refresh errors and incomplete-history coverage beside Quick View totals, and add focused regression coverage for retained spending after a failed scan.

Technical review

Best possible solution:

Keep the opt-in window and show spending freshness, coverage, and failure state beside its cost totals, using the existing controller values.

Do we have a high-confidence way to reproduce the issue?

Yes for the review finding: after a successful cost scan, make the next scan fail and reopen Quick View; source shows retained totals without the controller's stale-data warning. This path was established from source, not executed in this read-only review.

Is this the best way to solve the issue?

The opt-in route matches the owner's requested direction. The cost block still needs the same freshness and coverage context provided by the full dashboard.

Full review comments:

  • [P2] Show cost refresh and coverage warnings in Quick View — Integrations/Linux/qml/QuickView.qml:355-370
    A failed cost scan leaves previous spending in desktop.spending and sets desktop.costError, but this block still presents the old amount without a warning. It also omits the spending row's incomplete-history caveat. Display those states beside the total so the compact view does not make stale or partial spending look current.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d8c2af958176.

Labels

Label changes:

  • remove merge-risk: 🚨 automation: Current PR review merge-risk labels are merge-risk: 🚨 other.

Label justifications:

  • P3: This is an optional Linux UI enhancement with an off-by-default tray preference.
  • merge-risk: 🚨 other: The new view can present stale or partial spending without the warnings already available in the full dashboard.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The changed Linux Qt windows are shown running on Pop!_OS with synthetic usage: captures show the full default window, the off-by-default Settings toggle, and the explicit Quick View after the change; the contributor reports exercising the command routes on Wayland. The new saved preference defaults to false, and older settings files inherit that default through the existing merge-on-load path, so no migration is needed.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Linux Qt windows are shown running on Pop!_OS with synthetic usage: captures show the full default window, the off-by-default Settings toggle, and the explicit Quick View after the change; the contributor reports exercising the command routes on Wayland. The new saved preference defaults to false, and older settings files inherit that default through the existing merge-on-load path, so no migration is needed.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The changed Linux Qt windows are shown running on Pop!_OS with synthetic usage: captures show the full default window, the off-by-default Settings toggle, and the explicit Quick View after the change; the contributor reports exercising the command routes on Wayland. The new saved preference defaults to false, and older settings files inherit that default through the existing merge-on-load path, so no migration is needed.

Evidence

Acceptance criteria:

  • [P1] python3 Integrations/Linux/tests/test_desktop.py.
  • [P1] python3 Integrations/Linux/tests/test_package.py.
  • [P1] make test.
  • [P1] make check.

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • jsonMartin: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Show cost refresh errors and incomplete-history coverage in Quick View, with a focused failed-scan regression check.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-25T01:47:01.755Z sha 4b11f05 :: blocked before merge. :: [P1] Install the SVG development module in the Linux build action | [P2] Label inline spending as across accounts

@steipete

Copy link
Copy Markdown
Owner

Thanks @stackingrockss. Code review confirms this changes ordinary launch, --usage, and tray activation to the Quick View and starts a cost scan on open. Replacing the default Linux interaction is an owner decision, so nothing from this PR was adopted yet. The concrete opt-in shape that could land without that decision: a compactQuickView setting (default off) exposed as "Use compact Quick View from the tray", plus an explicit --quick-view command, with ordinary launch and --usage keeping the full window. If you are up for reworking the PR that way, it becomes a bounded adoption; otherwise it waits on the default-window call in #3971.

@stackingrockss stackingrockss changed the title Improve Linux Quick View to match the macOS menu Add opt-in Linux Quick View Sep 25, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. label Sep 25, 2026
@steipete

Copy link
Copy Markdown
Owner

Thanks @stackingrockss for reworking this into the opt-in shape. I checked the new head e4cc6b82b019: ordinary launch and --usage keep the Usage & Spend window, and Quick View has both a default-off tray preference and an explicit command, which is exactly what was asked. One gate still fails: showWindow("quick-view") starts a cost scan whenever Local spending is enabled and the cache is missing or older than five minutes, while the normal --usage window does not, and the updated desktop test expects that scan. If you drop the scan-on-open (show whatever is cached and leave scanning to the existing Spending/Refresh actions) and adjust that test, this is adoptable as is with your credit. Leaving the PR open for that change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants