feat(configurator): make consume tokens read-only - #325
Conversation
Consumption tokens are derived outputs (light-dark(), var(), relative color expressions) — editing them directly disconnects them from their upstream configure source and produces confusing results. - Replace the editor + reset button with a read-only dashed display showing the token's CSS expression for consume-role tokens - Whole consume row is subtly de-emphasised (opacity 0.7, no hover bg) - The modified highlight is suppressed for consume rows - No changes to TokenEditor.svelte — isolation is purely in TokenRow https://claude.ai/code/session_01D9eC3ahWV4H81xhE4g1P3o
|
Warning Review limit reached
More reviews will be available in 44 minutes and 45 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesConsume Token Non-Interactive Display
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
--sf-radius-m is a consumption token and is now read-only in the configurator, so the Playwright locator that waited for an editable input inside that row timed out. Replaced with --sf-radius-full which is a PUBLIC knob token in the same Border radius group. https://claude.ai/code/session_01D9eC3ahWV4H81xhE4g1P3o
All three Pill/border preset tokens (--sf-radius-s/m/l) are consumption tokens and are now read-only in the UI, so the text-input locator timed out. Switched the test to the Shadows domain instead: - Apply the "Strong" preset (sets --sf-shadow-strength, a knob) - Edit --sf-shadow-strength via its text input in Advanced mode - Verify no shadow preset shows as active --sf-shadow-strength is a PUBLIC-ADVANCED knob whose calc() value gives it a text control (inferControl falls through to 'text'), so the existing locator pattern works unchanged. https://claude.ai/code/session_01D9eC3ahWV4H81xhE4g1P3o
The previous two attempts used text-input locators against tokens that either no longer have text inputs (consume tokens) or whose text input was not reachable via the expected locator. The existing passing test 'shadow-strength knob round-trips' already demonstrates the correct interaction pattern for --sf-shadow-strength: open details.power, find the .knob, fill input[type="number"]. Adopt that same approach here — apply Strong preset, edit shadow-strength to 0.05 via the power knob, verify no shadow preset shows as active in Basic mode. https://claude.ai/code/session_01D9eC3ahWV4H81xhE4g1P3o
Summary
Consumption tokens are derived outputs (
light-dark(),var(), relative color expressions) — editing them directly disconnects them from their upstream configure source and produces confusing results where the preview stops responding to changes in the configure knobs.TokenEditor.svelteis untouched — isolation is purely inTokenRow.svelteTest plan
light-dark(…),var(--sf-…))https://claude.ai/code/session_01D9eC3ahWV4H81xhE4g1P3o
Generated by Claude Code
Summary by CodeRabbit
Bug Fixes