Repository navigation
feat: desktop design system, stabilization and dependency migration - #2587
devrajmahar wants to merge 10 commits into
Conversation
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
- Compile platform.css into GPUI colors, radii and shadows; bundle Inter and Faculty Glyphic - Restyle shared controls on the tokens and drop press fills so hover is the only pointer feedback - Fix Windows corners, ghost window, teleprompter border and screenshot header height - Tooltips: offset from the cursor and add the pointer tail - Timeline: keep clip waveforms inside the rounded corners - Export: success animation, side-by-side primary and outline pill buttons - Screenshot editor: undoable Reset back to the capture's default state - Default cursor style to macOS, background shadow off, chevron back icon, Aeris reset and brush icons - Background source tabs no longer overflow; Save As names drop invalid characters
|
@devrajmahar is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
| @@ -5,7 +5,7 @@ const key = () => serverEnv().STRIPE_SECRET_KEY ?? ""; | |||
| export const STRIPE_AVAILABLE = () => key() !== ""; | |||
| export const stripe = () => | |||
| new Stripe(key(), { | |||
| apiVersion: "2023-10-16", | |||
| apiVersion: "2026-09-30.endive", | |||
There was a problem hiding this comment.
The new Stripe API version moves billing periods onto subscription items, but getSubscriptionDetails still returns subscription.current_period_end. For an active Pro subscription, BillingSummaryCard passes that missing value to format, which throws instead of showing the billing card.
Migrate the remaining Pro billing reads alongside the SSO reads, including the period used by previewSeatChange.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/utils/src/lib/stripe/stripe.ts
Line: 8
Comment:
**Pro billing summary fails**
The new Stripe API version moves billing periods onto subscription items, but `getSubscriptionDetails` still returns `subscription.current_period_end`. For an active Pro subscription, `BillingSummaryCard` passes that missing value to `format`, which throws instead of showing the billing card.
Migrate the remaining Pro billing reads alongside the SSO reads, including the period used by `previewSeatChange`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| Theme::with_alpha(theme.primary_subtle, 0.9), | ||
| Theme::with_alpha(theme.primary_subtle, 0.75), | ||
| Theme::with_alpha(theme.primary_hover, 0.4), |
There was a problem hiding this comment.
These migrated controls still change token alpha at the call site. AGENTS.md requires migrated desktop UI to use semantic tokens without ad-hoc tints, and CSS.md explicitly bans changing alpha to create UI states.
Use the supplied selected and hover fills directly. The same pattern appears in the migrated text animation tiles and IconButton::glass. This repository requirement must be satisfied before merging.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/main_window.rs
Line: 216-218
Comment:
**Controls bypass theme colors**
These migrated controls still change token alpha at the call site. `AGENTS.md` requires migrated desktop UI to use semantic tokens without ad-hoc tints, and `CSS.md` explicitly bans changing alpha to create UI states.
Use the supplied selected and hover fills directly. The same pattern appears in the migrated text animation tiles and `IconButton::glass`. This repository requirement must be satisfied before merging.
**Context Used:** AGENTS.md ([source](https://github.com/capsoftware/cap/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| // Set initial `preferred_theme` value to current portal color-scheme | ||
| #[cfg(feature = "dbus")] | ||
| let preferred_theme = super::portal::theme().ok(); | ||
| #[cfg(not(feature = "dbus"))] | ||
| let preferred_theme = None; |
There was a problem hiding this comment.
Requested window theme ignored
Linux window creation now ignores attributes.preferred_theme and saves the portal’s current theme instead. A caller using WindowBuilder::with_theme(Some(Theme::Dark)) on a light desktop gets a light window, contrary to the builder’s documented contract.
Preserve the explicit choice and use the portal only when no theme was requested.
Prompt To Fix With AI
This is a comment left during a code review.
Path: vendor/tao/src/platform_impl/linux/window.rs
Line: 211-215
Comment:
**Requested window theme ignored**
Linux window creation now ignores `attributes.preferred_theme` and saves the portal’s current theme instead. A caller using `WindowBuilder::with_theme(Some(Theme::Dark))` on a light desktop gets a light window, contrary to the builder’s documented contract.
Preserve the explicit choice and use the portal only when no theme was requested.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
This PR gives the GPUI desktop app a proper design system and moves its existing UI onto it. It also fixes a long list of Windows and editor bugs, improves interaction feedback, and migrates the whole monorepo to current dependencies. The app goes from an early, inconsistent state to a stable, tokenized base that is much easier to keep building on.
Design system
apps/desktop-gpui/platform.cssis now the single source for colors, radii and shadows in light and dark. A build step compiles it into the GPUI theme.apps/desktop-gpui/CSS.mddocuments the tokens and how to use them.AGENTS.mdrequires them for desktop UI work.apps/desktop-gpui/srcgoes from 5 references in 1 file to 463 references across 51 files.theme.rs. Timeline segments, status chips, scrims, shadows, sliders, radio cards and the main window controls now use semantic tokens. Hardcoded colour literals drop from about 340 to about 164, and the rest are intentional: macOS materials, content overlays, platform window controls, illustrations, recording-state reds and user content.Stability and bug fixes
Feedback and UX
Dependency migration
packages/web-backend,web-domain,web-api-contract-effectand the web API routes) and updates the affected tests.taowindow library.Commits
0ca96ec0bchore: upgrade dependency stack across workspaces1bb0483aadocs: establish GPUI design token rules51f51f18cfeat: apply desktop design tokens across the GPUI app567f46327fix: turn the camera shadow off by default78ab8c345fix: pin ort to 2.0.0-rc.12 so cap-rendering tests buildc396f9d34refactor: migrate GPUI chrome colours to design tokens17e6aec85Merge origin/main into feat/desktop-design-tokens931c681e0fix: use semantic tokens instead of call-site alpha tints in GPUI controls961dcf555fix: read Stripe billing periods from subscription items50200da82fix: keep the requested window theme on LinuxReview follow-ups
getSubscriptionDetailsandpreviewSeatChangenow readitem.current_period_end. The seat preview also moves from the removedinvoices.retrieveUpcoming/listUpcomingLinestoinvoices.createPreview/listLineItems, and reads proration fromline.parent.main_window.rswere already on tokens inc396f9d34.IconButton::glass, the text animation tiles, the text case chips, the teleprompter controls, the Studio quality radio, and the warning and danger notices now usehover_bg,active_bg,primary_subtle,border_strong,warning_subtleandnegative_subtleinstead of changing token alpha. Alpha remains only in content illustrations (the Fade animation preview), gradient fades and timeline track colours.taonow usesattributes.preferred_themewhen one is set, and falls back to the portal colour scheme only when none was requested.Merge with main
ci.yml,settings_pages.rsandui/toggle.rsare resolved.ci.ymlkeeps main's removal of therust-cachejob and this branch's Rust 1.99. The GPUI test step calledcargo +1.95.0while the job installs 1.99, so it now uses+1.99.0.text_negativeandtext_warningreplace the removed Radix steps, and the selected outcome card usessurface_raised. The settings toggle stays ondisabled_bgandprimary.Testing
cargo testinapps/desktop-gpui(after the merge): 1,104 passing.cargo test -p cap-project(after the merge): 145 passing.cargo test -p cap-rendering: 274 passing.cargo test -p cap-camera-effects: 24 passing.cargo check --all-targetspasses forapps/desktop-gpui. Biome passes onplatform.cssand the two Stripe actions, and they type-check cleanly.Notes
crates/camera-effectsnow pinsortto=2.0.0-rc.12, matchingmainand the GPUI lockfile. The lockfile bump to rc.14 had broken thecap-renderingtest build.cargo clippyin the GPUI workspace reports lints that already exist onmain(token_compiler.rstype complexity,chunks_exactinkernels). CI clippy covers the root workspace only.taochange is Linux-only and was not compiled locally (Windows machine).tsc --noEmitinapps/webstill reports about 1,100 errors from the Effect 4 / Vitest 5 migration, mostly inapp/apiand unit tests. None come from main's code. They need a follow-up pass before this can merge.