Add Chinese Tarot reader app (TarotApp); replace resume page and update layout metadata - #1
Add Chinese Tarot reader app (TarotApp); replace resume page and update layout metadata#1Lossky wants to merge 1 commit into
TarotApp); replace resume page and update layout metadata#1Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e6a7d9342
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| function drawCards() { | ||
| const activeName = (selectedName || newName).trim(); |
There was a problem hiding this comment.
Let manual name entry override the current selection
When an existing profile is selected (which also happens automatically after loading saved data), drawCards always uses selectedName and ignores any text in the “录入新名字” field. In that state, typing a new person and pressing “开始解读” silently appends the reading to the previously selected profile, corrupting that person's history instead of creating/using the new profile.
Useful? React with 👍 / 👎.
| function createProfile() { | ||
| const trimmed = newName.trim(); | ||
| if (!trimmed) return; | ||
| upsertProfile(trimmed, notes.trim()); |
There was a problem hiding this comment.
Don't seed a new profile with another person's notes
The notes textarea is rebound to selectedProfile.notes in the effect above, so createProfile will usually save the currently selected person's background into the new profile unless the user manually clears it first. Because the app auto-selects the first saved profile on load, creating a second person from the default state clones the first person's notes and makes the stored profiles inaccurate.
Useful? React with 👍 / 👎.
| const month = date.getUTCMonth() + 1; | ||
| if (month >= 3 && month < 6) return seasonalGates[0]; | ||
| if (month >= 6 && month < 9) return seasonalGates[1]; | ||
| if (month >= 9 && month < 12) return seasonalGates[2]; |
There was a problem hiding this comment.
Base the default seasonal gate on the actual node dates
The helper only looks at the month number, so the default gate flips on the 1st of March/June/September/December rather than around the 春分/夏至/秋分/冬至 dates shown in dateRange. For example, from June 1 through June 19 it preselects 夏至 → 秋分, which makes the initial seasonal summary target the wrong quarter unless the user notices and changes it manually.
Useful? React with 👍 / 👎.
Motivation
Description
src/app/layout.tsxto changemetadatato Chinesetitle/description, remove theInterfont import/usage, and set<html lang="zh-CN">.src/app/page.tsxto import and render the newTarotAppcomponent instead of the previous resume UI.src/components/tarot-app.tsxwhich provides: an embedded tarot deck dataset, multiple spread configurations (single,three,love,career,seasonal,celtic), seasonal gate logic, draw/shuffle functions, summary builders, localStorage persistence viaSTORAGE_KEY, and a full reactive UI for creating/updating person profiles and viewing reading history.春分/夏至/秋分/冬至), spread selection, question input, and reading history navigation.Testing
Codex Task