Repository navigation
TIG-330 / TIG-336: Lucy's color-gradient UI on the new planner - #545
Windshield-Viper wants to merge 6 commits into
Conversation
Adds new-planner gradient tokens to every theme in TIGERPATH_THEME_OPTIONS (courseCard, courseCardHover, searchCard, searchCode, reqChip fills plus text, plan tab and requirement panel colors) and emits them as --tp-* CSS variables. Existing tokens are untouched so the classic UI is unchanged. - Course cards, hover, search cards, code pills and requirement chips use vertical gradients from the Figma; orange/blue are extrapolated. - Text colors darkened to pass WCAG AA on every stop (tested per theme). - new/styles.css no longer redefines base colors; they come from theme.js. - Theme is applied before first render (last theme kept in localStorage). - Print falls back to flat fills. Decision log: docs/decisions/TIG-330-gradient-ui.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The x used --tp-accent, which falls to 2.75:1 on the orange hover gradient; it now uses the card text color, and its red hover state sits on a light backing (>= 4.47:1 in every theme). Decision log adds D10 (icon contrast) and D11 (one branch/PR for TIG-330 and TIG-336) and notes the active plan tab's low luminance contrast for design review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 832792a485
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const themeName = profile?.theme || 'purple'; | ||
| useEffect(() => { | ||
| const root = document.documentElement; | ||
| Object.entries(getTigerPathThemeVariables(themeName)).forEach(([k, v]) => root.style.setProperty(k, v)); | ||
| root.dataset.tigerpathTheme = themeName; | ||
| applyTigerPathTheme(themeName); |
There was a problem hiding this comment.
Preserve the stored theme until the profile loads
On every initial render profile is null, so a non-purple user's stored theme is applied by main.jsx and then immediately replaced with purple by this effect; applyTigerPathTheme also writes that temporary purple value back to local storage. This produces a stored-theme → purple → profile-theme flash on normal loads and permanently loses the cached preference when the profile request fails. Delay applying/persisting the profile theme until profile is available, or initialize this fallback from the stored theme.
Useful? React with 👍 / 👎.
The theme effect applied purple while the profile was still loading (profile null), flashing purple and saving it over the remembered theme; a failed profile request also reset it to purple. Only apply and store a theme once the profile names one; until then the theme applied before first paint stays. Settings defaults to the remembered theme too. (Codex review on #545.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c5ce21cc7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| // Every color comes from theme CSS variables, so set them before the first paint. | ||
| // App re-applies the profile's theme once it loads. | ||
| applyTigerPathTheme(getStoredTigerPathTheme()); |
There was a problem hiding this comment.
Refresh the cached theme when leaving the classic UI
When a user changes their theme in the classic planner and then clicks “Try new UI,” the classic flow only updates CSS variables and the server profile; it never updates tigerpath-theme in local storage. This line therefore applies the previously cached theme before get_profile returns, causing exactly the stale-theme flash this first-paint logic is intended to prevent—for example, changing from pink to purple in classic initially paints the new planner pink. Persist the theme from the classic flow as well, or provide the server-side theme to this entry point.
Useful? React with 👍 / 👎.
Changing theme in the classic UI never updated the theme the new planner paints first, so switching UIs briefly showed the old theme. The classic App now remembers the profile's theme once the profile has loaded (no visual change to the classic UI). (Codex review on #545.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1efbeb93c0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| }, [activeThemeName]); | ||
| // Keep the new planner's remembered theme in sync, so switching UIs never paints a stale theme. | ||
| // Only once the profile has loaded: before that, activeThemeName is just the default. | ||
| if (profile?.theme) rememberTigerPathTheme(profile.theme); |
There was a problem hiding this comment.
Avoid caching the profile-error fallback
When /api/v1/get_profile/ fails in the classic UI, fetchProfile creates a fallback profile whose theme is purple, so this truthy check treats the fallback as successfully loaded and overwrites the user's remembered theme. A transient profile failure therefore erases a non-purple cached preference and makes the new planner's next first paint purple; preserve a null theme on failure or separately track whether the profile request succeeded before calling rememberTigerPathTheme.
Useful? React with 👍 / 👎.
When the classic UI's profile request failed, its fallback profile carried theme 'purple', which was then saved as the user's remembered theme. The fallback now has no theme; the page still shows the default as before. (Codex review on #545.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
TIG-330 / TIG-336: Lucy's color-gradient UI on the new planner
Closes TIG-336 (implementation), building on the TIG-335 audit. Part of TIG-330. Base:
parallel-planning/view.What changes
styles/theme.jsgets new-planner tokens in every theme:courseCardFill*,courseCardHoverFill*,searchCardFill*,searchCodeFill*andreqChipFill*(gradient stops), pluscourseCardText,reqChipText,planTabActiveFill,planTabsFillandreqPanelFill.getTigerPathThemeVariables()emits them as--tp-<surface>-fill-start/endthrough the same runtime mechanism as before. No second:rootcopy.new/styles.css, course cards, the course-card hover state, search cards, the search code pill and requirement chips now use vertical gradients from the Figma. The plan tab bar and active tab, the requirement panel tint,.tp-tagand.tp-btn-copynow read tokens and are no longer hard-coded.new/styles.css :rootkeeps only layout tokens. Base colors (--tp-text,--tp-border,--tp-muted,--tp-drop-*,--tp-incomplete) now come fromBASE_THEME.new/main.jsxapplies the last-used theme before rendering, so the page never paints without colors.Decisions
Full log, with the other options, in
docs/decisions/TIG-330-gradient-ui.md. Short version:tig-330-alt-shared-tokens(classic adopts the new palette)tig-330-alt-figma-exact-text(Lucy's exact colors, fails AA)Testing
bun run test: 19 tests pass. The newstyles/theme.test.jschecks WCAG AA for every text/gradient-stop pair in all four themes, checks that every variable is emitted, and pins the classic values.vite buildpasses.Screenshots (new planner, before → after)
Each image shows before (left) and after (right). Captured from the real new planner on sample data.
Screenshots (classic UI, after; pixel-identical to before)
Design review
@seowonlpark, please review. In particular:
🤖 Generated with Claude Code