Skip to content

triage(ui): 9 unresolved CSS class orphans with no git history — investigate each #2511

@alexey-pelykh

Description

@alexey-pelykh

Problem

#2502's CSS class drift audit surfaces orphans grouped into two buckets: drift clusters (attributable to a removing commit — see #2508, #2509, #2510) and unresolved (no .className rule ever existed in the ui/src/styles.css import graph, per git log -S over ui/src/styles/).

The unresolved bucket is a mix of bug classes:

  • BEM sub-elements added at call sites but never defined
  • Fork-side classes with no rule (may need fork-owned CSS)
  • Dynamic-construction artifacts that are scope-out false positives

Each needs individual investigation — blanket "add CSS rule" or "rename to X" doesn't apply.

Unresolved orphans (9)

Class Callsites Likely cause
.cron-run-entry__main views/cron.ts:1726 BEM sub-element of .cron-run-entry (defined) — parent exists, child doesn't
.cron-run-entry__title views/cron.ts:1727 same as above
.debug-event-log views/debug.ts:128 No rule anywhere. May want fork-owned CSS or refactor to existing class.
.form-field views/channels.nostr-profile-form.ts:94, :118 Likely fork-side, needs CSS rule or rename
.language- markdown.ts:187 False positive. Dynamic: class="language-${escapeHtml(lang)}" for code syntax highlighting — out of audit scope.
.monospace views/channels.nostr.ts:78, :210 Likely intended .mono (which exists) — rename candidate
.nav-item--external app-render.ts:284 Modifier added by fork #2501 but no CSS rule — needs fork-owned rule or remove
.nav-section--links app-render.ts:278 same as above
.nostr-profile-form views/channels.nostr-profile-form.ts:167 Fork-side, needs CSS rule

Scope

Per-class investigation, in whichever order makes sense. Likely outcomes:

  • Add fork-owned CSS rule (e.g., ui/src/styles/nostr.css or extend topbar-brand.css) for classes that SHOULD exist
  • Remove the class reference if it's unused by any CSS rule and has no styling effect
  • Rename to an existing class when a close match exists (e.g., .monospace.mono)
  • Annotate and skip for audit false positives (.language- prefix)

Acceptance criteria

  • Each of the 9 unresolved orphans has a disposition: ADD (new CSS rule), REMOVE (drop call-site reference), RENAME (change call-site to existing class), or SCOPE-OUT (known audit limitation)
  • Re-run node scripts/audit-css-class-drift.mjs — unresolved count drops to 0 or to only documented scope-out false positives

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions