Repository navigation
What's new and Report tabs - #6
Merged
Merged
Conversation
Two things Joseph asked for: a way to tell us when a move works differently from the real game, and a changelog he can actually read. What's new (src/features/News.jsx, src/data/changelog.js) - every update written up in plain words — what it means in a battle, not what changed in the code - a `credit` line for whoever spotted it, because being named in the changelog is the best part of reporting something - an amber dot on the tab until this build's entry has been read, remembered in localStorage like the rest of the app's state Report (src/features/Report.jsx, src/lib/feedback.js) - pick what kind of thing it is, optionally pick the move it's about, write it up, and press send: it opens GitHub with the issue already filled in - a copy button for when whoever is holding the tablet isn't logged in - a preview of exactly what gets sent, since this is a child's app and "what am I about to publish" should never be a mystery - no backend and nothing about the user collected — just the text typed, the move picked, and which version of the lab it came from feedback.js is tested rather than trusted: a report saying "Fire Spin & Wrap does 1/8 + a bit? see #4, 100% of max HP" has to survive being turned into a URL, and an over-long report is cut deliberately and says so instead of being mangled by the browser. The tab row now splits: the four battling tabs on the left, these two over on the right, a shade quieter. It wraps as a pair on a phone rather than stranding one per line. Also: MoveSelect takes an emptyLabel so the optional move picker can say "no move in particular" instead of the team builder's "— empty —". 177 tests pass. Verified in a real browser at desktop and phone widths. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017SGWh8kJjQsy4QB9pigonf
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.
Two things Joseph asked for: a way to tell us when a move works differently from the real game, and a changelog he can actually read.
What's new
src/data/changelog.jsholds the words,src/features/News.jsxdraws them. Every update written up in plain language — what it means in a battle, not what changed in the code. Entries carry acreditline for whoever spotted the thing, because being named in the changelog is the best part of reporting something.The tab shows an amber dot until this build's entry has been read, remembered in localStorage like the rest of the app's state.
The top entry's date doubles as the app's version stamp, and it's what gets attached to every bug report — so CLAUDE.md now says the changelog is part of shipping, not an afterthought, and
changelog.test.jsguards the shape (dates present, newest first, only the twokinds the UI can draw).Report
Composed in-app, filed on GitHub. Pick what kind of thing it is, optionally pick the move it's about, write it up, press send — GitHub opens with the issue already filled in and you press submit there. There's a copy button for when whoever is holding the tablet isn't logged in, and a "see exactly what gets sent" preview, because in a child's app what am I about to publish should never be a mystery.
No backend, nothing about the user collected: just the text typed, the move picked, and which version of the lab it came from. That matches the standing rule in CLAUDE.md — no accounts, nothing collecting personal data.
src/lib/feedback.jsis tested rather than trusted. A report sayingFire Spin & Wrap does 1/8 + a bit? see #4, 100% of max HPhas to survive being turned into a URL — the&would start a new parameter, the#would cut the link short. An over-long report is cut deliberately with a visible note rather than being silently mangled by the browser.Writing the tests caught a real trap:
decodeURIComponenton an already-decoded100%throwsURI malformed. Exactly the kind of string a Pokémon bug report contains.Tab layout
The row now splits — the four battling tabs on the left, these two over on the right and a shade quieter, since they're about the app rather than about Pokémon. They're grouped so they wrap as a pair on a phone instead of stranding one per line.
Also
MoveSelecttakes anemptyLabelso the optional move picker can say "no move in particular" instead of the team builder's "— empty —". Default unchanged, so the team builder is untouched.Checks
npm run test:run— 177 pass, 21 of them new (feedback URL building, changelog shape).npm run build— clean.🤖 Generated with Claude Code
https://claude.ai/code/session_017SGWh8kJjQsy4QB9pigonf