Skip to content

feat: Sea Creatures tab UI (ACNL + ACNH) — v0.8.2-alpha#44

Merged
jacuzzicoding merged 22 commits into
developmentfrom
feature/sea-creatures-tab
May 1, 2026
Merged

feat: Sea Creatures tab UI (ACNL + ACNH) — v0.8.2-alpha#44
jacuzzicoding merged 22 commits into
developmentfrom
feature/sea-creatures-tab

Conversation

@jacuzzicoding
Copy link
Copy Markdown
Owner

@jacuzzicoding jacuzzicoding commented Apr 24, 2026

Summary

Surfaces the Sea Creatures data that shipped in v0.8.0-alpha (PRs #34/#35 — 40 species in public/data/acnh/sea_creatures.json, also present for ACNL) with a dedicated museum tab. The tab was explicitly deferred from feature/sea-creatures-tab to keep v0.8.0 scope contained; this PR integrates that work onto the current development state.

What's in scope:

  • Sea tab appears in TabBar for ACNH and ACNL towns; hidden for all others
  • Switching to a non-ACNH/ACNL town while on the Sea tab redirects to Home
  • Sea creatures reuse the CollectibleRow + ItemExpandPanel path — months, value (bells), and shadow size shown in the expand panel (same UX as fish/bugs)
  • Donation toggles work; donations persist to the 3-level store schema
  • Home tab progress grid includes a Sea Creatures card for ACNH/ACNL towns
  • Global search covers sea creatures
  • CSV export includes sea creatures in the activity log and category completion section
  • SeaCreature type, isSeaCreature type guard, updated AnyItem union, globalFilter, and useCategoryStats all extended
  • Version bumped to 0.8.2-alpha; branch-label footer suffix (· feature/sea-creatures-tab) auto-strips on main/development

Decisions

  • Reused CollectibleRow + ItemExpandPanel instead of a new view component. Sea creatures have the same shape as fish/bugs (months, value, optional hemisphere) so the existing expand panel covers the UX without new components. Shadow size maps to the subtitle slot (the same slot fish use for habitat).
  • MODAL_BLOCKED_TABS not extended. The v0.8.1 greyed-out-button stopgap applies to fish, bugs, and fossils only. Sea creatures is a new tab and should behave like art (buttons active). Correct for v0.9 layout lift.
  • Conflict resolution — ACCanvas.tsx. Development added ItemExpandPanel, EditTownModal, expandedId state, and the CollectibleRow → div+panel render. The sea-creatures branch added the sea_creatures VALID_TAB and the redirect-on-game-switch guard. Both sets of changes were additive to different sections; resolved by taking all of development's additions plus the sea-creatures guard effect.

Test plan

  • npm run build — clean (0 errors, 0 warnings)
  • npm test — 521 tests passing across all worktrees
  • Manual: create ACNH town → Sea tab visible, items load, expand panel shows months + bells + shadow, donate toggle persists
  • Manual: switch to ACGCN town → Sea tab disappears, redirected to Home
  • Manual: Home tab → Sea Creatures progress card present for ACNH town
  • Manual: Global search → sea creatures appear in results
  • Preview URL (from Vercel check on this PR)

Closes #56

jacuzzicoding and others added 3 commits April 23, 2026 20:28
The DetailModal's fixed-inset-0 backdrop can receive the same browser
click event that triggered it, because React 18 may flush the state
update and mount the modal before the event loop settles — causing the
modal to open and close in the same frame (appears as 'nothing happens').

Add a setTimeout(0) guard via useRef so the backdrop's onClick is a
no-op for one tick after mount. Also add type="button" to CollectibleRow
to prevent implicit type="submit" behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a game-conditional Sea Creatures tab that appears only when the
active town's game is ACNL or ACNH. Follows the exact same pattern
as the Fish/Bugs tabs — same CollectibleRow, same donation toggle,
same DetailModal flow.

Key changes:
- SeaCreature interface in types.ts; CategoryId extended to include 'sea_creatures'
- getDataPaths() returns sea_creatures.json path for ACNL/ACNH, null otherwise
- useMuseumData fetches sea_creatures in parallel with other categories
- TabBar shows "Sea" tab only when data.sea_creatures.length > 0 (game-conditional)
- ACCanvas resets to home if user switches to a game without sea creatures
- rowSubtitle shows shadow size; itemNotes returns time availability for sea creatures
- itemMonths handles months_nh/months_sh for ACNH hemisphere-aware display
- isSeaCreature type guard added; globalFilter and CSV export include sea_creatures
- HomeTab progress grid conditionally shows sea creatures card

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

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

Project Deployment Actions Updated (UTC)
animalcrossingwebapp Ready Ready Preview, Comment May 1, 2026 10:51pm

jacuzzicoding and others added 19 commits April 29, 2026 20:07
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The React Router v6 refactor (commit 2d844c9) removed the expandedId state,
ItemExpandPanel import, and the wrapping div+panel render from ACCanvas. This
re-wires everything: fish/bugs/fossils rows expand in-place; art rows still
open the DetailModal bottom-sheet. Also resets expandedId on tab change so
no panel leaks between tabs.

Also fixes Prettier formatting in MuseumHeader.tsx (same issue as PR #43,
needed here since that branch hasn't merged yet).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: detail view regression — modal closes immediately after open
…pdown

fix: restore ItemExpandPanel inline-expand in category tabs
- Remove branch label from version footer (production build shows clean version string)
- CHANGELOG: close in-progress section with date 2026-04-29; consolidate all v0.8 entries;
  add inline-expand restore and backdrop fix to Fixed section
- CLAUDE.md: mark v0.8.0-alpha as shipped; update roadmap; add sea creatures known issue

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CHANGELOG: close in-progress section with 2026-04-29; add New Leaf data,
  inline-expand restore (PR #46), and backdrop fix (PR #43) entries; consolidate
  all v0.8 Added/Fixed items into clean sections
- CLAUDE.md: mark v0.8.0-alpha as shipped; update roadmap section; add sea
  creatures known issue

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
README.md
- Update opening description: all 5 games now supported (not "in development")
- Expand feature list: inline expand (ItemExpandPanel), bottom-sheet detail view
  (DetailModal), hemisphere toggle, React Router URL navigation
- Add React Router v6 to Tech Stack; note Zustand schema v3
- Add ACNL + ACNH entries to Data section; note sea creatures tab is pending v0.9
- Bump version badge from v0.7.0-alpha → v0.8.0-alpha

index.html
- Fix title: "AC GCN Museum - Fish Collection" → "Animal Crossing Museum Tracker"
- Add meta description tag

vite.config.ts
- Add VERCEL_GIT_COMMIT_SHA env var check before falling back to git rev-parse,
  per deployment rules; Vercel preview builds now surface the correct commit SHA

.claude/rules/architecture.md
- Bump heading and persist references from v2 → v3
- Add ItemExpandPanel to component list with description
- Clarify DetailModal as bottom-sheet for Art + Search results
- Update storeMigrations note to include v3 (hemisphere backfill)
- Update useMuseumData note to mention sea creatures
- Mark acnl/ as present (no longer pending)
- Fix Dev Preview note: no manual vercel CLI

docs/dev-process.md
- Fix stale dev preview URL (old Vercel pattern → current subdomain)

docs/v0.7-architecture-proposal.md
- Add historical footer note: all steps shipped; v0.8 extended the foundation

docs/v0.7-audit.md
- Add historical footer note: all P0s resolved in v0.7; P1/P2s addressed by v0.8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CI flagged 'process is not defined' (no-undef) because eslint.config.js
applied globals.browser to all *.{ts,tsx} files, including vite.config.ts.
Added a dedicated override block for vite.config.ts with globals.node so
the VERCEL_GIT_COMMIT_SHA env check lints cleanly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore: sync release/v0.8.0-alpha doc commits back to development
…v0.7 references

- Move version-history.html from repo root to public/ so Vercel serves it
  at /version-history.html on the live site; content updated for v0.8.0-alpha
- docs/architecture.md: bump header to v0.8; rewrite stale ACCanvas block
  (was "~1500 lines, scheduled for decomposition" — now 405-line shell)
- docs/dev-process.md + .claude/rules/dev-process.md: heading v0.7+ → v0.8+
- package.json: populate description field with project summary + live URL
- vite.config.ts: inject VITE_GIT_BRANCH via VERCEL_GIT_COMMIT_REF / git fallback
- App.tsx: version label now shows "v{version} · {branch}" for easier preview
  identification (was version+sha)
- CHANGELOG.md: open [v0.8.1] In Progress section
- CLAUDE.md: note v0.8.1 in progress

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docs/decisions.md: two initial entries — Sea Creatures data/UI split
  (v0.8 scope deferral, 2026-04-23) and edit-town modal grey-out on
  category tabs (PR #50, 2026-04-30)
- CHANGELOG.md: add decisions.md entry to v0.8.1 Added section
- README.md: one-line mention of decisions.md in Version section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docs/dev-process.md + .claude/rules/dev-process.md: add "Filing & Closing
  Bugs" section — every bug fix must have an issue, use Closes #N for
  auto-close, retro-file for past gaps
- CHANGELOG.md: add workflow entry + Process section documenting the backfill
  (issues #51–53, closed #30, updated #31 and #26)

GitHub hygiene actions taken in this commit:
- Issue #51 filed (edit-town modal bubble, open — Closes on PR #50 merge)
- Issue #52 filed + closed (DetailModal backdrop bubble, fixed by PR #43)
- Issue #53 filed + closed (inline-expand regression, fixed by PR #46)
- Issue #30 closed (town switcher duplicate, fixed by PR #41)
- Issue #31 title broadened + v0.9 label + comment added
- Issue #26 labelled v0.9
- Labels created: regression, v0.9

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore(v0.8.1): doc sweep — version-history to public, fix stale v0.7 references
…meFields

- EditTownModal gains isOpen prop and always-mounted pattern; createPortal removed
  since it's now mounted above the header in ACCanvas (no bubbling workaround needed)
- editing state lifted from TownSwitcher to ACCanvas, consistent with all other modals
- TownNameFields extracted to src/components/shared/TownNameFields.tsx; used by
  both CreateTownModal and EditTownModal to eliminate duplicated field markup
- MuseumHeader threads onEditTown prop through to TownSwitcher
- EditTownModal form state syncs from town primitives via useEffect (always shows current values)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On Fish, Bugs, and Fossils tabs the edit (pencil) and new-town (+) buttons
are disabled: opacity 0.4, cursor not-allowed, aria-disabled, and a tooltip
directing users to Home/Search/Recent Donations. TownSwitcher reads the
current tab via useParams to compute the blocked state.

Intentional v0.8.1 stopgap — modals lift to layout level in v0.9 UI revamp.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(edit-town): mount guard + lift state to ACCanvas + extract TownNameFields
- package.json: bump version 0.8.0-alpha → 0.8.1-alpha
- CHANGELOG.md: mark [v0.8.1-alpha] released 2026-04-30
- CLAUDE.md: update current version to v0.8.1-alpha shipped 2026-04-30
- App.tsx: version footer shows clean v{version} on prod host;
  shows v{version} · {branch} on previews/dev

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore: sync release/v0.8.1-alpha back to development
Surfaces the sea_creatures.json data (shipped in v0.8.0, PRs #34/#35) with a
dedicated Tab in the museum UI. The tab is hidden for games without sea creature
data (ACGCN, ACWW, ACCF) and redirects to Home if the active town switches to an
incompatible game.

Sea creatures reuse the existing CollectibleRow + ItemExpandPanel path (months,
bells, shadow shown in the expand panel). Donation toggles persist to the store.

Also includes: version bump to 0.8.2-alpha, branch-label suffix in footer
(auto-stripped on main/development), SeaCreature type + isSeaCreature guard,
globalFilter + csvExport + HomeTab progress grid coverage.

Closes #56

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jacuzzicoding jacuzzicoding added the feature New feature or capability label May 1, 2026
@jacuzzicoding jacuzzicoding changed the title feat: Sea Creatures tab for ACNL and ACNH feat: Sea Creatures tab UI (ACNL + ACNH) — v0.8.2-alpha May 1, 2026
@jacuzzicoding jacuzzicoding merged commit a684ce6 into development May 1, 2026
3 checks passed
@jacuzzicoding jacuzzicoding mentioned this pull request May 1, 2026
3 tasks
@jacuzzicoding jacuzzicoding deleted the feature/sea-creatures-tab 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

feature New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant