Skip to content

feat(web): migrate workspace settings pages off bespoke CSS (migration phase 3, surface 2) - #789

Merged
Zach Dunn (zachdunn) merged 2 commits into
mainfrom
feat/shadcn-phase-3-settings
Aug 23, 2026
Merged

feat(web): migrate workspace settings pages off bespoke CSS (migration phase 3, surface 2)#789
Zach Dunn (zachdunn) merged 2 commits into
mainfrom
feat/shadcn-phase-3-settings

Conversation

@zachdunn

Copy link
Copy Markdown
Member

Second phase-3 surface of the Tailwind + shadcn migration (follows #787; plan in .context/2026-08-22-tailwind-shadcn-migration-plan.md, local doc).

What

  • Comment-settings tab (settings.astro): the .cs-* layout family (install banner, row grid + 680px breakpoint, preview repo field, GitHub-comment preview bubble, savebar layout) moved to Tailwind utilities; legacy class names stay as DOM hooks.
  • Storage tab (settings/storage.astro): the entire scoped <style> block (~114 lines — summary steps, checklist, adopt/check rows, data-state colors) migrated, including the two script-generated HTML strings.
  • Deliberately left as CSS: genuinely state-driven rules — .cs-toggle/.cs-seg aria-state styling, .cs-row--dimmed, savebar data-mode visibility. Converting those buys no debt reduction and risks behavior.
  • Left shared: settings-page/settings-section/ws-page-header etc. in account-content.css still serve developers/profile/galleries — they migrate with their own surfaces.

A cascade lesson (also fixes a latent #787 bug)

Tailwind utilities live in @layer utilities, so any unlayered rule from the kept ul-* primitives beats them regardless of specificityul-input/ul-select set width: 100%, which silently defeated w-[8rem]/w-auto. The three narrow-width controls (max-inline + image-width inputs here, and the member role select from #787) now carry inline widths. Rule of thumb recorded for later surfaces: utilities can't override a kept unlayered primitive; either delete the primitive rule with its surface or use an inline style.

Verification

  • astro build, lint green; workspace-ui vitest 47/47.
  • Visual audit against the local stack with a signed-in owner session (fixture role elevated), migrated DOM confirmed live: both tabs at parity with pre-migration baselines, including the collapsed-input regression caught and fixed during audit.
  • The 680px responsive breakpoint and savebar dirty-state were not resize/interaction-tested locally — the media query is confirmed present in the built CSS; worth a quick prod eyeball.

Screenshots attach via the managed comment.

…n phase 3, surface 2)

Move the GitHub-comment settings tab (settings.astro) and the storage /
BYO-bucket sub-page (settings/storage.astro) from their page-scoped .cs-*
and .storage-* CSS onto Tailwind utility classes, keeping the legacy
class names in markup as DOM/test hooks (none turned out to be asserted
on by tests). Both pages' scoped <style> blocks only ever served these
two pages exclusively (confirmed by grep across apps/web/src) — no
account-content.css rule needed touching, and settings-page/
settings-section/ws-page-header stay untouched since they're shared
with developers/profile/galleries pages outside this surface.

storage.astro: .storage-actions, .storage-summary(__step/__num/__body/
__title/__sub), .storage-instructions, #storage-form, .storage-checklist
(+ :empty/li), .storage-adopt-label, .storage-check-row/-hint,
.storage-signed-only-note, and the data-state color rules all move to
utilities (including in the two script-generated markup strings); the
entire <style> block is deleted.

settings.astro: .cs-install(__body/__cta incl. hover/focus-visible),
.cs-repo-banner, #cs-form, .cs-row(__info/__label-line/__label/__desc/
__control), .cs-image-width-px, #cs-max-inline, .cs-row--note(__note-head/
__note-count + textarea), .cs-preview-repo-field/-select/-footnote,
.cs-ghc(-avatar/-bubble/-head/-user/-bot-chip), .cs-preview-body (+ img/
table/td), and the savebar's static layout all move to utilities
(including the 680px stack breakpoint, via max-[680px]:). Left as CSS,
deliberately: .cs-toggle/__knob (aria-checked pseudo-state transitions),
.cs-seg/__btn (radiogroup aria-checked + :hover:not()/:first-child), the
JS-toggled .cs-row--dimmed class, and the savebar's data-state/data-mode
conditional-visibility selectors — genuinely state-driven CSS, not layout
duplication, and converting them risked functional regressions for no
CSS-debt payoff.

Verified: astro build green, pnpm lint clean (only pre-existing warnings
elsewhere), comment-preview-sanitize.test.ts passes (29/29, unaffected by
this change — no test asserts these class strings).
…ives

Tailwind utilities live in @layer utilities, so any unlayered rule from the
kept ul-* primitives (ul-input/ul-select set width: 100%) beats them
regardless of specificity. The three narrow-width controls (max-inline and
image-width inputs on comment settings, the member role select from #787)
now carry inline widths instead of w-* utilities.
@changeset-bot

changeset-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 79661d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@uploads-sh

uploads-sh Bot commented Aug 23, 2026

Copy link
Copy Markdown

127.0.0.1-account-workspaces-dev-demo-settings-after.webp
/account/workspaces/dev-demo/settings · after

127.0.0.1-account-workspaces-dev-demo-settings-storage-after.webp
/account/workspaces/dev-demo/people · after

Maintained by uploads.sh · add media: uploads put <file> --pr 789 · docs

@zachdunn
Zach Dunn (zachdunn) merged commit 9548d2c into main Aug 23, 2026
1 of 3 checks passed
@zachdunn
Zach Dunn (zachdunn) deleted the feat/shadcn-phase-3-settings branch August 23, 2026 00:52
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (2)
  • coderabbit:review
  • review
🚫 Excluded labels (none allowed) (1)
  • wip

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a51b5591-d423-4fc0-890f-91651b4848de

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

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

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