4.4 KiB
OpenSpec Tasks: Web UI Component Cleanup — Inline Styles, Forms, Badges
Change
web-ui-spacing-typography-rework — Pass 2: Component Cleanup
Parent Spec
openspec/specs/web-ui-spacing-typography-rework-pass2.md
Status
tasks
Implementation Tasks
-
1. Add utility classes to
apps/web/src/styles/utilities.css- Layout:
.row,.row-sm,.row-md,.row-lg,.stack,.stack-sm,.stack-md,.stack-lg,.stack-xl,.items-start,.items-center,.items-end,.justify-between,.justify-center,.justify-end,.flex-1,.flex-none,.w-full,.min-w-0,.max-w-prose,.max-w-form - Spacing:
.m-0,.mt-1through.mt-6,.mb-0through.mb-6,.ml-auto,.mr-auto,.p-1through.p-5,.px-2through.px-4,.py-1through.py-4 - Typography:
.text-xs,.text-sm,.text-base,.text-lg,.text-xl,.font-mono,.font-medium,.font-semibold,.text-center,.text-left,.text-right - Visual:
.cursor-pointer,.overflow-auto,.overflow-hidden,.rounded-sm,.rounded-md,.rounded-lg,.rounded-xl,.rounded-full - Cards:
.card-sm,.card-md,.card-lg
- Layout:
-
2. Add form utilities to
apps/web/src/styles/global.css.form-section.form-row.form-help.text-error- Unify
.form-groupand.form-fieldinto one rule block
-
3. Add button aliases in
apps/web/src/styles/global.css.primary-button→ alias to.btn.btn-primary.secondary-button/.button-secondary→ alias to.btn.btn-secondary.ghost-button→ explicit style or alias to.btn.btn-secondary.btn-iconmodifier
-
4. Add status badge family to
apps/web/src/styles/global.css.status-badge.status-badge--running,.status-badge--success.status-badge--error,.status-badge--failed.status-badge--warning.status-badge--info,.status-badge--pending,.status-badge--idle- Keep
.instance-chipas deprecated alias if widely used
-
5. Refactor
apps/web/src/components/features/tool/manifest-editor.tsx- Replace static inline styles with utility classes
- Keep dynamic values inline (e.g. drag-over background, preview content)
- Target ≥50% reduction in inline style blocks
-
6. Refactor
apps/web/src/components/features/config-profiles/ConfigProfileEditorPanel.tsx- Replace static inline styles with utility classes
- Use
.alert-successfor save success banner - Use
.drag-item/.drag-item-activefor include list items - Use
.dialog-actionsfor sticky footer
-
7. Refactor
apps/web/src/components/features/tool-workshop/ToolTypeEditorPanel.tsx- Replace static inline styles with utility classes
- Use shared empty-state and form header patterns
-
8. Refactor
apps/web/src/components/features/tool-workshop/ToolTypeListSidebar.tsx- Replace
280pxwithvar(--sidebar-width) - Replace list-item inline spacing with utility classes
- Replace
-
9. Refactor
apps/web/src/components/features/config-profiles/ConfigProfileListSidebar.tsx- Replace
280pxwithvar(--sidebar-width) - Replace remaining inline badge styles with
.badge/.badge-secondary - Replace inline delete button with
.btn-iconor.ghost-button.small
- Replace
-
10. Refactor
apps/web/src/components/features/git/git-mount-editor.tsx- Replace static inline styles with utility classes
- Use
.stack,.row,.card-*,.gap-*,.p-*,.mb-*
-
11. Verification
- Run
cd apps/web && npm run typecheck - Run
cd apps/web && npm run lint - Count inline style blocks in target components; confirm ≥50% reduction overall
- Search for
280pxinapps/web/src; confirm zero matches - Spot-check Tool Workshop and Config Profiles pages
- Run
Acceptance Criteria
- All tasks above are completed.
npm run typecheckpasses.npm run lintpasses.- Inline style blocks in the six target components reduced by at least 50% overall.
- No hardcoded
280pxsidebar widths remain in source. .status-badgefamily is defined and used by at least one caller..form-groupand.form-fieldshare a single CSS rule block.- Button aliases work visually.
Notes
- Do not rename or remove existing classes without aliases; backward compatibility matters.
- Keep dynamic inline styles (computed values) in JS.
- Do not unify modals or cards across page CSS files in this pass (Pass 3).
- Prefer one commit per major component or utility group.