Skip to content

refactor(ui): Tailwind v4 conventions + fix command palette escape#9

Merged
rivodotlove merged 2 commits into
mainfrom
refactor/tailwind-v4-palette-escape
Jun 2, 2026
Merged

refactor(ui): Tailwind v4 conventions + fix command palette escape#9
rivodotlove merged 2 commits into
mainfrom
refactor/tailwind-v4-palette-escape

Conversation

@rivodotlove

@rivodotlove rivodotlove commented Jun 2, 2026

Copy link
Copy Markdown
Owner

What

Browser-verified UI cleanup + bug fix.

Tailwind v4 conventions

  • text-[var(--x)]text-(--x) (v4 CSS-var shorthand)
  • [&_[cmdk-group-heading]]:…**:[[cmdk-group-heading]]:… (all-descendants variant)
  • outline-noneoutline-hidden (v4 a11y-preserving focus reset)

Drop custom pixels → native scale

  • font sizes text-[length:10px] / text-[10px] / text-[11px] / text-[13px]text-xs / text-sm
  • pl-[14px]pl-3.5, h-[2px]h-0.5
  • kept off-scale unit pt-[15vh], data-[…] variants, shadow-2xl

Fix: command palette won't close on Escape

react-hotkeys-hook ignores keys originating from form tags by default. Command.Input is autofocused, so Escape was suppressed and onClose never fired. Added enableOnFormTags: true.

Verification

  • vp lint 0/0, tsc -b clean
  • Playwright on :15036: group-heading styling renders; Escape now closes the palette (was stuck open before)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added comprehensive Tailwind CSS skill guide covering core principles, responsive design, component patterns, state variants, dark mode, and configuration.
    • Added reference materials for component library, configuration options, and utility patterns.
  • Style

    • Refined UI typography, spacing, and form/textarea keycap styling for improved visual consistency.
  • Enhancement

    • Improved command palette keyboard handling for more reliable Escape behavior.

- swap arbitrary classes for v4 idioms: text-[var(--x)] -> text-(--x),
  [&_[cmdk-group-heading]] -> **:[[cmdk-group-heading]], outline-none -> outline-hidden
- drop custom px font sizes, snap to native scale (text-xs / text-sm);
  pl-[14px] -> pl-3.5, h-[2px] -> h-0.5
- fix command palette not closing on Escape: react-hotkeys-hook ignores
  form-tag-originating keys by default and Command.Input is autofocused,
  so add enableOnFormTags: true
- add tailwindcss skill docs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rivodotlove rivodotlove self-assigned this Jun 2, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
devbox c9978ec Commit Preview URL

Branch Preview URL
Jun 02 2026, 09:38 AM

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f42067a6-c4a5-4a1b-b9b7-3019bf55b8bb

📥 Commits

Reviewing files that changed from the base of the PR and between 10ad0e3 and c9978ec.

📒 Files selected for processing (2)
  • .claude/skills/tailwindcss/SKILL.md
  • .claude/skills/tailwindcss/resources/configuration.md
✅ Files skipped from review due to trivial changes (1)
  • .claude/skills/tailwindcss/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .claude/skills/tailwindcss/resources/configuration.md

📝 Walkthrough

Walkthrough

This PR adds a full Tailwind CSS v4 skill guide with resource pages and updates UI components to modern Tailwind v4 syntax (semantic text sizing, outline-hidden, and unbracketed arbitrary value classes).

Changes

Tailwind CSS v4 Skill Documentation

Layer / File(s) Summary
Core Tailwind CSS v4 skill documentation
.claude/skills/tailwindcss/SKILL.md
Complete Tailwind v4 reference covering core principles, utility patterns (layout, spacing, typography, colors), responsive design, component patterns, state variants, dark mode, custom styling with arbitrary values and @apply, v4 CSS-first configuration (@import "tailwindcss", @theme), v3 config compatibility, official plugin examples, performance notes, and links to resource guides.
Skill reference guides
.claude/skills/tailwindcss/resources/component-library.md, .claude/skills/tailwindcss/resources/configuration.md, .claude/skills/tailwindcss/resources/utility-patterns.md
Focused resource pages: component library covers UI patterns (buttons, forms, cards, navigation, modals, data display, feedback); configuration guide details theme customization, content paths, plugins, dark mode, and production optimization; utility patterns outlines advanced techniques across spacing, layout, typography, colors, effects, transitions, and responsive design.

UI Component Tailwind Modernization

Layer / File(s) Summary
AppShell navigation, tabs, and command palette styling
src/app/shell/app-shell.tsx, src/app/shell/command-palette.tsx
Sidebar tool links and active states migrate from fixed pixel sizing to semantic text-sm and adjusted padding; category header button changes to text-xs; active tab indicator height changes from h-[2px] to h-0.5; tab labels update to text-sm. CommandPalette Escape hotkey now enables on form tags; input outline switches from outline-none to outline-hidden; Command.Group heading classes consolidated to new selector syntax.
Route pages and utility components styling
src/routes/index.tsx, src/routes/tool.$toolId.tsx, src/modules/base64/ui/base64-tool.tsx, src/app/shell/shortcuts-cheatsheet.tsx
Welcome screen and tool route links replace bracketed arbitrary values (text-[var(--...)]) with unbracketed form (text-(--...)). Base64Tool input/output labels change to text-xs and textareas switch to outline-hidden. Shortcuts keycap styling updates from text-[11px] to text-xs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • rivodotlove/devbox#8: Introduces the Base64Tool component; this PR updates its styling to use modernized Tailwind syntax.

Poem

🐰 In Tailwind v4's tidy land,
I hop with classes neat and planned,
text-sm, text-xs in ordered rows,
outline-hidden where focus goes,
Documentation blooms where knowledge grows.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the two main changes: Tailwind v4 convention refactoring across the UI codebase and a command palette escape key bug fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/tailwind-v4-palette-escape

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/tailwindcss/resources/configuration.md:
- Line 11: The file uses Tailwind v3 terminology: change the heading "Opacity
modifiers" to refer to v4's slash-based color opacity (e.g., "Color opacity
(slash notation)"), replace "Template paths for purging" with "Content paths for
scanning" or "Content paths (built‑in scanning)" and remove any mention of
"PurgeCSS configuration" replacing it with "Built‑in content scanning / content
configuration"; update any explanatory sentences that describe purging to
instead describe Tailwind v4's content scanning behavior so the doc matches v4
terminology and behavior.

In @.claude/skills/tailwindcss/SKILL.md:
- Line 119: Replace the deprecated focus:outline-none usages with the Tailwind
v4 replacement focus:outline-hidden in the className strings; locate the literal
"focus:outline-none" occurrences (e.g., the button element with className
containing "px-4 py-2 ... focus:outline-none focus:ring-2 ...") and update them
to "focus:outline-hidden" at the three spots mentioned (lines around the button
at 119 and the other occurrences referenced at 151 and 224) while preserving the
surrounding focus:ring and disabled classes.
- Line 358: Remove the outdated v3 "purge" guidance by editing the sentence
"Ensure purge is configured correctly" in .claude/skills/tailwindcss/SKILL.md
(the line that currently reads “Ensure purge is configured correctly”) and
replace it with v4-appropriate guidance or delete it; ensure the Tailwind v4
section explicitly mentions that automatic content detection replaces the old
purge/content configuration so the doc no longer references "purge" as a
required step.
- Line 29: The sidebar example uses the deprecated Tailwind v4 utility
"flex-shrink-0"; update the className to the new utility "shrink-0" in the
element that currently reads className="flex-shrink-0" (the Sidebar div) so the
example matches Tailwind v4 naming.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f863f553-ab9a-4ce7-8a71-5c834e3ca04d

📥 Commits

Reviewing files that changed from the base of the PR and between e24bb35 and 10ad0e3.

📒 Files selected for processing (10)
  • .claude/skills/tailwindcss/SKILL.md
  • .claude/skills/tailwindcss/resources/component-library.md
  • .claude/skills/tailwindcss/resources/configuration.md
  • .claude/skills/tailwindcss/resources/utility-patterns.md
  • src/app/shell/app-shell.tsx
  • src/app/shell/command-palette.tsx
  • src/app/shell/shortcuts-cheatsheet.tsx
  • src/modules/base64/ui/base64-tool.tsx
  • src/routes/index.tsx
  • src/routes/tool.$toolId.tsx

Comment thread .claude/skills/tailwindcss/resources/configuration.md Outdated
Comment thread .claude/skills/tailwindcss/SKILL.md Outdated
Comment thread .claude/skills/tailwindcss/SKILL.md Outdated
Comment thread .claude/skills/tailwindcss/SKILL.md Outdated
Address CodeRabbit review on PR #9:
- flex-shrink-0 -> shrink-0 (v4 rename)
- focus:outline-none -> focus:outline-hidden (v4 a11y focus reset)
- replace purge / PurgeCSS / "Template paths for purging" with v4 automatic
  content detection + @source guidance
- "Opacity modifiers" -> color opacity slash syntax

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rivodotlove rivodotlove merged commit 497fd9e into main Jun 2, 2026
3 checks passed
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