Skip to content

Use resultUpdatedAt to derive current day and add day-14 championship test#85

Open
dai wants to merge 1 commit into
mainfrom
codex/fix-changes-not-reflecting-after-merging-pr83-hikejz
Open

Use resultUpdatedAt to derive current day and add day-14 championship test#85
dai wants to merge 1 commit into
mainfrom
codex/fix-changes-not-reflecting-after-merging-pr83-hikejz

Conversation

@dai

@dai dai commented May 23, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Ensure the site considers known but not-yet-published results when deciding the current tournament day so championship UI appears as soon as day 14 has started.

Description

  • Compute referenceDate from MAY2026_TORIKUMI_DATA.resultUpdatedAt?.slice(0, 10) and derive latestKnownDay by filtering resultDays with isoDate <= referenceDate and taking the max day.
  • Set currentDay to Math.max(latestPublishedResultDay, latestKnownDay) so the UI reflects the latest known day even if not published.
  • Add a unit test shows championship header as day 14 when day 14 has started in app/page.test.tsx which renders Home and asserts the championship headings are present.
  • Modified files: app/page.tsx and app/page.test.tsx.

Testing

  • Ran unit tests with the test suite and the new test shows championship header as day 14 when day 14 has started executed successfully.
  • Existing app/page.test.tsx assertions continued to pass after the change.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 23, 2026

Copy link
Copy Markdown

Deploying o-sumo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9998340
Status: ✅  Deploy successful!
Preview URL: https://dfe6612a.o-sumo.pages.dev
Branch Preview URL: https://codex-fix-changes-not-reflec-h150.o-sumo.pages.dev

View logs

@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: 9998340943

ℹ️ 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".

Comment thread app/page.test.tsx
</MemoryRouter>,
);

expect(screen.getByRole('heading', { level: 2, name: '優勝争い(14日目)' })).toBeInTheDocument();

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 Make championship test compute expected day from fixture

This assertion hard-codes 14日目, so the test will fail as soon as MAY2026_TORIKUMI_DATA.resultUpdatedAt advances to day 15 even if Home is behaving correctly. Because this dataset is updated over time, the test is time-sensitive and can break CI for a valid UI change; deriving the expected day from fixture data (or freezing a dedicated test fixture) would keep the test stable.

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