Skip to content

fix(suppliers): refresh late CTE records when agreed hours change - #3610

Merged
PetrefiedThunder merged 2 commits into
mainfrom
codex/supplier-hours-drilldown
Oct 28, 2026
Merged

PetrefiedThunder merged 2 commits into
mainfrom
codex/supplier-hours-drilldown

Conversation

@PetrefiedThunder

@PetrefiedThunder PetrefiedThunder commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The agreed sending time feature merged in #3575. If the agreed hours changed while a late CTE record list was open, that list could keep showing records from the previous agreement. The late CTE row now resets when the agreed hours change, and reopening it loads records for the current agreement.

The regression test uses generated record identifiers and checks that the prior record disappears before the current record is loaded. The supplier view remains read only, as it is on main.

Verification

The focused frontend suite passed: 16 tests. ESLint, the staged secret scan, and the diff check passed. Type checking reported only the existing error in src/instrumentation.ts(26,5) about queues in DataCollection.

This PR changes two frontend files. It does not apply a database migration. The production migration status of #3575 was not verified here.


Note

Low Risk
Small supplier dashboard UI fix with no API or auth changes; behavior is covered by a focused component test.

Overview
Fixes a stale UI bug where an open late CTE “View records” list could still show rows from the previous agreed sending time after the summary updated.

The late CTE row’s React key now includes agreed_sending_hours (or unset), so when hours change the row remounts and its drilldown state resets; reopening loads records for the current agreement. Tests add a lateRecordItem helper with realistic event/received timestamps and a regression case that rerenders with new hours, asserts the old record id disappears, and verifies a fresh fetch on reopen.

Reviewed by Cursor Bugbot for commit 47f6b60. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
regengine Ready Ready Preview Oct 28, 2026 11:13am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

PR Blocker Checklist

Head SHA: 47f6b6042639e4f6de87d60da82c0b6e9daf5654

Status: Ready

  • All review threads resolved
  • No reviews requesting changes
  • No blocked review engines

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Vercel preview: https://regengine-mudwkbw12-petrefiedthunders-projects.vercel.app

Access is via Vercel login (Deployment Protection).

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Bundle Size Report

Metric Size
Total JS 5581.0KB (5.45MB)
Total CSS 131.9KB
Limit 10.0MB

Bundle is within the 10.0MB limit.

@PetrefiedThunder PetrefiedThunder left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

REVIEW: PASS grok 47f6b60

Remounting late_cte MetricRow when agreed_sending_hours changes correctly clears stale drilldown state; regression test covers open, hours change, old id gone, reopen loads new id. Main merge is clean (no conflict markers; PR still only touches data-quality.tsx and its test). Supplier view remains read-only. CI was still mostly queued on this head at review time; re-check before merge.

@PetrefiedThunder
PetrefiedThunder marked this pull request as ready for review October 28, 2026 13:54
@PetrefiedThunder
PetrefiedThunder merged commit 3fa8e95 into main Oct 28, 2026
76 of 83 checks passed
@PetrefiedThunder
PetrefiedThunder deleted the codex/supplier-hours-drilldown branch October 28, 2026 13:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T13:55:58.703977Z 47f6b60 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch was successfully deployed

1 active deployment
Preview — 47f6b604 Deployed Oct 28, 2026 by vercel[bot]
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