Skip to content

fix(ui): correct invalid disabled:file variant on the upload file-input#1056

Merged
BigSimmo merged 4 commits into
mainfrom
claude/fix-file-input-disabled-opacity
Jul 22, 2026
Merged

fix(ui): correct invalid disabled:file variant on the upload file-input#1056
BigSimmo merged 4 commits into
mainfrom
claude/fix-file-input-disabled-opacity

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

The document-upload <input type="file"> in DocumentManagerPanel used the class disabled:file:opacity-50. Tailwind compiles that to a :disabled pseudo-class bound to the ::file-selector-button pseudo-element. Per the CSS selectors spec only user-action pseudo-classes (:hover, :active, …) may follow a pseudo-element, so the generated selector is invalid CSS:

  • Turbopack's dev CSS parser rejects and drops the rule → the dev server logs a recurring globals.css parse error (Invalid pseudo class after pseudo element), and a disabled file input was never actually dimmed.
  • The production build (lightningcss) tolerated it, so it never broke CI — this is a dev-parity fix plus a real (if cosmetic) behaviour fix.

Fix: use plain disabled:opacity-50 on the input — the conventional, valid pattern that dims the whole control when disabled (the input is conditionally disabled in demo mode / while uploading / without upload permission).

Verification

Confirmed with the project's own @tailwindcss/postcss transform (toggling the class and re-compiling globals.css):

  • disabled:file:opacity-501 invalid selector emitted: .disabled\:file\:opacity-50:disabled::file-selector-button
  • disabled:opacity-500 invalid selectors

Pre-existing on main; unrelated to any in-flight feature work. One-line, className-only change.

Risk and rollout

  • Risk: negligible — className-only; the new class is standard Tailwind and produces valid CSS.
  • Rollback: single-commit revert.
  • Provider or production effects: None.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Updated the disabled appearance of the guideline PDF upload control for clearer visual feedback.

DocumentManagerPanel's <input type="file"> used `disabled:file:opacity-50`, which
Tailwind compiles to a `:disabled` pseudo-class bound to the `::file-selector-button`
pseudo-element. Only user-action pseudo-classes may follow a pseudo-element, so that
selector is invalid CSS: Turbopack's dev parser rejects and drops the rule (the disabled
file input was never actually dimmed, and the dev server logged a recurring globals.css
parse error).

Use plain `disabled:opacity-50`, which dims the whole control when disabled — the
conventional, valid pattern. Verified with the project's own @tailwindcss/postcss
transform: the old class emits 1 invalid `::file-selector-button`+`:disabled` selector,
the fix emits 0. Pre-existing on main; the production build (lightningcss) tolerated it,
so this is dev-parity plus a real cosmetic fix (disabled uploads now dim).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@supabase

supabase Bot commented Jul 22, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a521b097-96f2-4623-88ab-ff22837ed5fe

📥 Commits

Reviewing files that changed from the base of the PR and between ca08128 and 39082fe.

📒 Files selected for processing (1)
  • src/components/clinical-dashboard/DocumentManagerPanel.tsx

📝 Walkthrough

Walkthrough

The guideline PDF file input now uses general disabled opacity styling instead of file-specific disabled opacity styling.

Changes

Document upload styling

Layer / File(s) Summary
Disabled file input appearance
src/components/clinical-dashboard/DocumentManagerPanel.tsx
The disabled file input class changes from disabled:file:opacity-50 to disabled:opacity-50.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the file-input Tailwind class fix.
Description check ✅ Passed The description covers the summary, verification, risk, and rollback, and is complete enough for this small UI-only change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-file-input-disabled-opacity

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

@BigSimmo
BigSimmo enabled auto-merge (squash) July 22, 2026 02:00
@BigSimmo
BigSimmo merged commit 737c2e8 into main Jul 22, 2026
17 checks passed
@BigSimmo
BigSimmo deleted the claude/fix-file-input-disabled-opacity branch July 22, 2026 02:32
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.

2 participants