Skip to content

TIG-330 / TIG-336: Lucy's color-gradient UI on the new planner - #545

Open
Windshield-Viper wants to merge 6 commits into
parallel-planning/viewfrom
tig-330-tigerpath-implement-lucys-color-gradient-ui-on-the
Open

Windshield-Viper wants to merge 6 commits into
parallel-planning/viewfrom
tig-330-tigerpath-implement-lucys-color-gradient-ui-on-the

Conversation

@Windshield-Viper

@Windshield-Viper Windshield-Viper commented Nov 24, 2026 •

Copy link
Copy Markdown

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

  • Tokens: styles/theme.js gets new-planner tokens in every theme: courseCardFill*, courseCardHoverFill*, searchCardFill*, searchCodeFill* and reqChipFill* (gradient stops), plus courseCardText, reqChipText, planTabActiveFill, planTabsFill and reqPanelFill. getTigerPathThemeVariables() emits them as --tp-<surface>-fill-start/end through the same runtime mechanism as before. No second :root copy.
  • Styles: in 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-tag and .tp-btn-copy now read tokens and are no longer hard-coded.
  • Duplicates removed: new/styles.css :root keeps only layout tokens. Base colors (--tp-text, --tp-border, --tp-muted, --tp-drop-*, --tp-incomplete) now come from BASE_THEME.
  • First paint: new/main.jsx applies the last-used theme before rendering, so the page never paints without colors.
  • Print: flat fills, black text.
  • Classic UI: unchanged. Existing token values are untouched and pinned by a test, and the screenshots are pixel-identical before and after in all four themes.

Decisions

Full log, with the other options, in docs/decisions/TIG-330-gradient-ui.md. Short version:

# Decision Other option
D1 New tokens; classic UI untouched tig-330-alt-shared-tokens (classic adopts the new palette)
D2 Orange and blue extrapolated from each theme's hue plus purple/pink lightness (per Helen) none
D3 The darker card in the Figma is the hover state (per Helen) none
D4 Text darkened to pass WCAG AA on every gradient stop tig-330-alt-figma-exact-text (Lucy's exact colors, fails AA)
D5 Requirement chip gradient runs top to bottom, like the Figma none
D6 Active plan tab: lime fill from the Figma, keeps the theme-colored border (lime and grey differ mostly in hue) none
D7–D9 Base-token dedupe, themed first paint, flat print fills none
D10 Course-card × uses the card text color; red hover on a light backing (icon contrast ≥ 3:1) none
D11 One branch and PR for TIG-330 and TIG-336 none

Testing

  • bun run test: 19 tests pass. The new styles/theme.test.js checks WCAG AA for every text/gradient-stop pair in all four themes, checks that every variable is emitted, and pins the classic values.
  • vite build passes.
  • Visual checks: the real new and classic UIs rendered against mocked API data at 1440px, 1100px and 760px, plus print. I also checked the drop-ok and drop-warn highlights against the new gradients.

Screenshots (new planner, before → after)

Each image shows before (left) and after (right). Captured from the real new planner on sample data.

Purple theme, before and after

Orange theme, before and after

Blue theme, before and after

Pink theme, before and after

Screenshots (classic UI, after; pixel-identical to before)

Classic UI in all four themes, unchanged

Design review

@seowonlpark, please review. In particular:

  • D4: text is darker than in the Figma.
  • D6: the active tab keeps its border. Lime and grey differ mostly in hue (luminance contrast 1.03 to 1.12), so check that the active tab still reads clearly.
  • Orange and blue: extrapolated, since the Figma has no mockups for them.

🤖 Generated with Claude Code

Windshield-Viper and others added 3 commits November 23, 2026 20:39
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>
@linear

linear Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

TIG-330

TIG-336

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T20:16:36.282468Z 3650e03 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread frontend/src/new/App.jsx Outdated
Comment on lines +32 to +34
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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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>
@Windshield-Viper

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread frontend/src/new/main.jsx

// 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());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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>
@Windshield-Viper

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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>
@Windshield-Viper

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 3650e03797

ℹ️ 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".

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant