feat: Sea Creatures tab UI (ACNL + ACNH) — v0.8.2-alpha#44
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks
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>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fromfeature/sea-creatures-tabto keep v0.8.0 scope contained; this PR integrates that work onto the currentdevelopmentstate.What's in scope:
CollectibleRow+ItemExpandPanelpath — months, value (bells), and shadow size shown in the expand panel (same UX as fish/bugs)SeaCreaturetype,isSeaCreaturetype guard, updatedAnyItemunion,globalFilter, anduseCategoryStatsall extended0.8.2-alpha; branch-label footer suffix (· feature/sea-creatures-tab) auto-strips onmain/developmentDecisions
fish,bugs, andfossilsonly. Sea creatures is a new tab and should behave likeart(buttons active). Correct for v0.9 layout lift.ItemExpandPanel,EditTownModal,expandedIdstate, and the CollectibleRow → div+panel render. The sea-creatures branch added thesea_creaturesVALID_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 worktreesCloses #56