Repository navigation
BulkFixTimezoneShiftButton: confirm before firing - #44
Merged
Merged
Conversation
Addresses a Copilot review finding on buzz-code/react-admin-nestjs#167: the button fired immediately on click, no confirmation, for an action that can corrupt already-correct data if run on the wrong rows. Passing children to BulkActionButton switches it to dialog mode (via BulkRequestButton/ActionOrDialogButton), so it now shows a warning with the selected-row count and requires an explicit confirm click. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeX6BFe7P4pHLPm3VwFjPn
buzz-code
force-pushed
the
claude/fix-timezone-shift-confirm
branch
from
September 2, 2026 09:04
d50daf3 to
85a6782
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Non-admin users can end up with an “empty” bulk actions toolbar because the self-hiding button is still counted as a truthy bulk action element.
Pull request overview
Adds a confirmation step for the admin-only bulk action that fixes createdAt/updatedAt timezone-shifted rows, reducing the risk of accidentally shifting already-correct data when the wrong rows are selected.
Changes:
- Introduces
BulkFixTimezoneShiftButtonwhich provides warning/confirmation dialog content before executing thefixTimezoneShiftbulk action. - Auto-detects timestamped resources in
CommonList(via list data) and conditionally offers the bulk action button on those lists.
File summaries
| File | Description |
|---|---|
| components/crudContainers/CommonList.jsx | Adds auto-detection of timestamp columns and injects the bulk timezone-fix action into bulk actions. |
| components/crudContainers/BulkFixTimezoneShiftButton.jsx | New bulk-action button that renders confirmation dialog content and restricts visibility to admins. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
buzz-code
pushed a commit
to buzz-code/react-admin-nestjs
that referenced
this pull request
Sep 2, 2026
Picks up: - buzz-code/nra-server#46: cache the Intl.DateTimeFormat instance in fixTimezoneShift (was constructed fresh up to 3x per date column per row) - buzz-code/nra-client#44: BulkFixTimezoneShiftButton now confirms before firing (was immediate on click) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeX6BFe7P4pHLPm3VwFjPn
buzz-code
added a commit
to buzz-code/react-admin-nestjs
that referenced
this pull request
Sep 2, 2026
…167) * Bump client/shared and server/shared: admin-only timezone-fix action Picks up: - buzz-code/nra-server#45: generic admin-only 'fixTimezoneShift' doAction on BaseEntityService, correcting createdAt/updatedAt for rows written before the mysql connection was pinned to UTC (nra-server#44) - buzz-code/nra-client#43: matching admin-only bulk action button, auto-offered on any list whose rows carry createdAt/updatedAt No per-entity wiring needed on either side - every list backed by BaseEntityService with createdAt/updatedAt (att_report, klass, student, teacher, ...) picks this up automatically. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeX6BFe7P4pHLPm3VwFjPn * Bump client/shared and server/shared: address Copilot review findings Picks up: - buzz-code/nra-server#46: cache the Intl.DateTimeFormat instance in fixTimezoneShift (was constructed fresh up to 3x per date column per row) - buzz-code/nra-client#44: BulkFixTimezoneShiftButton now confirms before firing (was immediate on click) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeX6BFe7P4pHLPm3VwFjPn --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Summary
Addresses a Copilot review finding on buzz-code/react-admin-nestjs#167 (submodule bump PR for #43): the button fired immediately on click with no confirmation, for a bulk action that can shift already-correct data the wrong way if run on the wrong rows.
Change
Pass
childrentoBulkActionButton— this switches it to dialog mode (BulkRequestButton/ActionOrDialogButton), showing a warning with the selected-row count and requiring an explicit confirm click before the action fires.Testing
cd client && yarn test— 31/32 suites passing (1 pre-existing skip, unrelated)cd client && yarn build— clean🤖 Generated with Claude Code
https://claude.ai/code/session_01KeX6BFe7P4pHLPm3VwFjPn
Generated by Claude Code