Skip to content

refactor(dashboard): inline AvatarInitial derivation - #599

Merged
LudoLoops merged 1 commit into
mainfrom
594-dashboard-avatar-initial
Oct 13, 2026
Merged

LudoLoops merged 1 commit into
mainfrom
594-dashboard-avatar-initial

Conversation

@LudoLoops

Copy link
Copy Markdown
Contributor

Summary

Part of #594. Inline the one-use derived initial in Dashboard AvatarInitial.svelte so the markup reads the current name directly. This preserves reactive updates, uppercase behavior, the empty-name fallback, sizing, and consumer classes. Adds render/rerender coverage and a svforge patch changeset.

Validation

  • Targeted AvatarInitial, Dashboard composition, Skeleton-native, and Skeleton-markup tests: 49 passed.
  • bun run lint, bun run typecheck, and bun run build:all: passed.
  • bash scripts/test-scaffold.sh base: passed.
  • Dashboard scaffold build/check passed; its Vitest run had 2 failures because the configured database already contains 13 foreign rows (40 passed, 3 skipped).
  • Full bun run test: 1,192 passed; 3 timed out (canary-snapshots, packed user journey, and a real scaffold test under the local run).

This is one small Dashboard derivation tranche; the broader #594 audit remains open.

Copy link
Copy Markdown
Contributor Author

Review completed — no merge blockers (head 77c4acfaf4bba2bd44dd6c9c2f8cf49e24d778f6).

This focused #594 tranche removes the single-use $derived(initial) from Dashboard AvatarInitial.svelte and directly renders name[0]?.toUpperCase() ?? '?'. The Svelte 5 property expression remains reactive; the name prop contract, sizes, cn() consumer class override, fallback for empty names, and markup are unchanged.

  • New component-level render/rerender tests verify name updates, dynamic sizing, consumer classes, and empty-name fallback. Non-blocking test improvement: explicitly rerender or render a lowercase starting letter to assert toUpperCase() (the current test names, Ada and Grace, already start uppercase).
  • Verified the generated packages/svforge/src/templates.ts Dashboard entry is identical to the component source. Changeset and Graphify updates are present; no custom CSS or extra abstraction.
  • GitHub Actions CI refactor(ui): audit all scaffolded components for a minimal Skeleton v5-first baseline #594 passed on this exact head: required quality job succeeded, including lint, typecheck, dependency audits, manifest freshness, build-all, and the full test suite; main-smoke is expected to skip on PRs. Reported local timeouts and pre-populated Dashboard test-database failures did not recur in the required root CI and do not establish a regression in this display-only refactor.
  • No unresolved review discussions; GitHub reports the PR mergeable. The broader audit issue refactor(ui): audit all scaffolded components for a minimal Skeleton v5-first baseline #594 should remain open.

MERGE DECISION: READY TO MERGE.

@LudoLoops
LudoLoops merged commit cf5ff96 into main Oct 13, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 13, 2026
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