Skip to content

Add Chinese Tarot reader app (TarotApp); replace resume page and update layout metadata - #1

Open
Lossky wants to merge 1 commit into
mainfrom
codex/create-tarot-card-interpretation-program
Open

Add Chinese Tarot reader app (TarotApp); replace resume page and update layout metadata#1
Lossky wants to merge 1 commit into
mainfrom
codex/create-tarot-card-interpretation-program

Conversation

@Lossky

@Lossky Lossky commented Mar 20, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Replace the starter resume UI with a localized Chinese Tarot reading application that supports persistent person profiles and a seasonal (四季) spread workflow focused on next-quarter analysis.
  • Update top-level metadata and document language to better match the new app content and audience.

Description

  • Updated src/app/layout.tsx to change metadata to Chinese title/description, remove the Inter font import/usage, and set <html lang="zh-CN">.
  • Replaced the resume page content in src/app/page.tsx to import and render the new TarotApp component instead of the previous resume UI.
  • Added a new client component src/components/tarot-app.tsx which 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 via STORAGE_KEY, and a full reactive UI for creating/updating person profiles and viewing reading history.
  • Implemented seasonal (四季) spread semantics that draw one card per suit plus a major arcana to represent the next quarter and provided UI controls to choose node (春分/夏至/秋分/冬至), spread selection, question input, and reading history navigation.

Testing

  • No automated tests were run for this change.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +203 to +206
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];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant