Skip to content

feat(home): v0.9 Phase 6 — rebuilt HomeTab + ProgressMeter#72

Merged
jacuzzicoding merged 1 commit into
developmentfrom
feature/v09-phase-6-home
May 4, 2026
Merged

feat(home): v0.9 Phase 6 — rebuilt HomeTab + ProgressMeter#72
jacuzzicoding merged 1 commit into
developmentfrom
feature/v09-phase-6-home

Conversation

@jacuzzicoding
Copy link
Copy Markdown
Owner

@jacuzzicoding jacuzzicoding commented May 4, 2026

Summary

Phase 6 of the v0.9.0-beta UI revamp. Rebuilds the HomeTab and ships the new ProgressMeter component, then wires Home shelf cards and the latest-donations row into the scroll-to + highlight effect that ACCanvas added in Phase 5.

  • ProgressMeter (src/components/ProgressMeter.tsx) — segmented donation bar. 4 segments (fish/bugs/fossils/art) for ACGCN/ACWW/ACCF; 5 segments (adds sea) for ACNL/ACNH. Each segment uses its category-tinted Meadow chip token and exposes a per-segment aria-label like "Fish: 12 of 40 donated". Pure helper segmentsForGame extracted to progressMeterUtils.ts and unit-tested.
  • HomeTab rebuilt — hero stat with italic Fraunces accent number ("X creatures still to donate this month") + warn-italic aside ("N leaving soon"); ProgressMeter directly underneath; 12-cell month strip with current-month highlight; "Leaving end of {month}" warn-toned shelf; "Just arrived" accent shelf; latest-donations card. Shelf cards and recent rows fire jumpTo(category, id) → navigate + set highlightId so ACCanvas's existing effect scrolls the target row into view and adds .ac-row-pulse.
  • useJumpToRow hook — reusable navigate + setHighlightId helper. Will also be used by GlobalSearchDropdown in Phase 8.

Side benefit: ACNH home screen now correctly shows available fish/bugs for the current month — old HomeTab had a bug where the empty-state message showed for ACNH regardless of actual availability. Closes #71.

Decisions honored

  • Decision 4 — Sea creatures appear as a 5th ProgressMeter segment for ACNL/ACNH and as a 3rd seasonal shelf source. Identical gating to sidebar nav.
  • Decision 10 — Scroll-to + highlight uses ACCanvas's existing wiring (added in Phase 5): set highlightId → effect calls scrollIntoView({ behavior: 'smooth', block: 'center' }) and the .ac-row-pulse keyframe plays for 1.4s. The hook clears highlightId to null first so re-jumping to the same id retriggers the pulse.
  • Meadow tokens only (Decision 2) — all colors come from CSS custom properties (--accent, --warn, --chip-* etc.); no Tailwind design tokens, no Varela Round.
  • No version bump — still v0.9.0-beta.

Notable tradeoffs:

  • ProgressMeter placed on the HomeTab hero, not the sidebar. The plan allows either; placing it under the hero stat keeps the bar near the headline number it relates to and the sidebar already shows per-category counts.
  • Hero copy adapts when the active game has no seasonal categories with data — falls back to "X of Y donated." rather than showing a misleading "0 still to donate" line.
  • Shelves cap at 6 cards each (sliced) to avoid an unbounded vertical wall on towns with many in-season items.

Test plan

  • npm run build — passes, zero TS errors
  • npm test — 63 tests pass, including 4 new tests for segmentsForGame (ACGCN 4-seg, ACWW art-omitted, ACNH 5-seg, ACNL 5-seg drops sea when totals are 0)
  • npm run lint — clean (0 warnings, max-warnings 0)
  • Manual: dev preview verified for ACGCN, ACNL (with sea data), ACNH (NH + SH hemispheres) — hero stat accurate, month strip highlights current month, leaving/new shelves correct, ProgressMeter shows 4 vs 5 segments by game, click shelf card scrolls + pulses target row in correct tab.
  • Manual: 980px responsive — 5-segment meter wraps to 2 rows; shelf grid drops to 2 cols.

Screenshots

Bea to add.

Closes #71

🤖 Generated with Claude Code

Adds segmented ProgressMeter (4 or 5 segments by gameId), rebuilt HomeTab
with hero stat + month strip + leaving-soon / just-arrived shelves +
latest donations card, and useJumpToRow hook wiring shelf/recent cards
into ACCanvas's scroll-to + pulse highlight effect.

Honors Locked Decisions 4 (sea in ProgressMeter for ACNL/ACNH) and 10
(scrollIntoView + .ac-row-pulse on jump). No version bump.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 4, 2026 00:44
@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
animalcrossingwebapp Ready Ready Preview, Comment May 4, 2026 0:44am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Phase 6 of the v0.9 UI revamp: rebuilds HomeTab and introduces a new segmented ProgressMeter, plus wiring for “jump to row + highlight” using ACCanvas’s existing highlightId scroll/pulse effect.

Changes:

  • Add ProgressMeter component (4–5 segments depending on game) with segmentsForGame helper + unit tests.
  • Rebuild HomeTab layout (hero, month strip, leaving/arrived shelves, latest donations) and hook up shelf/recent clicks to navigate + highlight a target row.
  • Introduce useJumpToRow hook and plumb gameId/hemisphere/setHighlightId through ACCanvasHomeTab.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/index.css Adds Phase 6 styles for ProgressMeter + rebuilt Home UI.
src/hooks/useJumpToRow.ts New hook to navigate to a category and set highlightId on next frame.
src/components/progressMeterUtils.ts Adds segmentsForGame helper for 4 vs 5 segment selection.
src/components/ProgressMeter.tsx New segmented progress UI driven by segmentsForGame.
src/components/ProgressMeter.test.ts Unit tests covering segmentsForGame behavior across games.
src/components/HomeTab.tsx Full HomeTab rewrite + shelves/recent rows wired to jumpTo.
src/components/ACCanvas.tsx Passes gameId, hemisphere, and setHighlightId into HomeTab.
docs/v0.9-plan.md Marks Phase 6 complete.
CLAUDE.md Updates repo structure notes to include new Phase 6 files.
CHANGELOG.md Documents Phase 6 additions and decisions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<div
key={cat}
className="ac-meter-seg"
aria-label={`${label}: ${done} of ${total} donated`}
Comment on lines +212 to +221
const showSeasonalUI = seasonalCats.length > 0;

return (
<div className="space-y-4">
{/* Hero: Available this month */}
<div
className="rounded-[16px] border overflow-hidden"
style={{ borderColor: '#E7DAC4', backgroundColor: '#FFFDF6' }}
>
<div className="ac-home">
{/* Hero */}
<section className="ac-hero">
<div className="ac-eyebrow ac-eyebrow-accent">
{showSeasonalUI ? `Available in ${monthName}` : `Your museum`}
</div>
{showSeasonalUI ? (
Comment on lines +123 to +158
const avail: ShelfItem[] = [];
const leaving: ShelfItem[] = [];
const arrived: ShelfItem[] = [];

for (const cat of seasonalCats) {
const items = (data[cat] as AnyItem[]) ?? [];
for (const item of items) {
if (!item.months?.includes(currentMonth)) continue;
if (donated[item.id]) continue;
out.push({
const months = itemMonths(item, cat, hemisphere);
if (!months || !months.includes(currentMonth)) continue;
const isDonated = !!donated[item.id];
const entry: ShelfItem = {
id: item.id,
name: displayName(item, category),
category,
leavingSoon: !item.months.includes(nextMonth),
});
name: displayName(item, cat),
category: cat,
months,
bells:
'value' in item
? ((item as FishType | BugItem | SeaCreature).value ?? null)
: null,
};
avail.push(entry);
if (isDonated) continue;
if (!months.includes(nextMonth)) leaving.push(entry);
else if (!months.includes(lastMonth)) arrived.push(entry);
}
}

const stillNeededCount = avail.filter(a => !donated[a.id]).length;

const sortByName = (a: ShelfItem, b: ShelfItem) =>
a.name.localeCompare(b.name);
leaving.sort(sortByName);
arrived.sort(sortByName);

void avail;
return {
@jacuzzicoding jacuzzicoding merged commit a93c450 into development May 4, 2026
7 checks passed
@jacuzzicoding jacuzzicoding mentioned this pull request May 4, 2026
6 tasks
@jacuzzicoding jacuzzicoding deleted the feature/v09-phase-6-home branch May 4, 2026 23:16
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