Skip to content

Group duration context menu utils#1748

Open
alex-Arc wants to merge 4 commits into
masterfrom
group-duration-utils
Open

Group duration context menu utils#1748
alex-Arc wants to merge 4 commits into
masterfrom
group-duration-utils

Conversation

@alex-Arc
Copy link
Copy Markdown
Collaborator

Adds 2 items to the context menu
for the group there is now the option to set the target duration to match the accumulated duration of the group
for events inside groups one can now make that one event expand or contract in duration so that the groups target is met

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 24, 2025

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 96eb0f4c-b102-40e4-800e-a67fff12becd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch group-duration-utils

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@alex-Arc alex-Arc force-pushed the refactor-context-menue branch from b0befcc to ba2ec4a Compare August 26, 2025 17:12
Base automatically changed from refactor-context-menue to alpha-4 August 26, 2025 17:20
@alex-Arc alex-Arc force-pushed the group-duration-utils branch from 6385474 to 2e6fba9 Compare August 26, 2025 17:21
const group = rundown.entries[groupId];
if (!group || !isOntimeGroup(group) || group.targetDuration === null) return;
const event = rundown.entries[eventId];
if (!event || !isOntimeEvent(event)) return;
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.

we could really use a way to show errors like this
maybe the toasters we were thinking of?

{
type: 'item',
label: 'Match Target Group Duration',
icon: TbClockPin,
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.

ideas for icons are welcome

{
type: 'item',
label: 'Match Group Duration',
icon: TbClockPin,
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.

ideas for icons are welcome

@alex-Arc alex-Arc requested a review from cpvalente August 26, 2025 17:26
@alex-Arc alex-Arc changed the title Group duration utils Group duration context menu utils Aug 26, 2025
@cpvalente
Copy link
Copy Markdown
Owner

@alex-Arc, lets leave this one for later

@alex-Arc alex-Arc added the Later will be taken up later label Aug 29, 2025
Base automatically changed from alpha-4 to v4 September 3, 2025 13:50
Base automatically changed from v4 to master October 7, 2025 10:51
@cpvalente
Copy link
Copy Markdown
Owner

@alex-Arc we are in a better place to add this now. Could we prepare it for production?

@alex-Arc alex-Arc force-pushed the group-duration-utils branch from 2e6fba9 to 3134865 Compare April 3, 2026 13:53
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/client/src/common/hooks/useEntryAction.ts`:
- Around line 338-349: In matchGroupDuration inside useEntryAction.ts the code
uses group.duration (runtime metadata) which can be stale; instead compute the
group's current duration by summing the durations of the group's member entries
from the current rundown.entries map (use the group's child IDs or group.entries
to iterate and sum each entry.duration), then calculate durationDiff =
groupTarget - summedDuration and apply that diff to the event's duration before
calling updateTimer(eventId, 'duration', ...). Update references to
group.duration to this derived sum so optimistic cache changes are respected.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9849e47a-b10d-4bc1-9106-c8abdc959c5b

📥 Commits

Reviewing files that changed from the base of the PR and between 3022ec2 and 3134865.

📒 Files selected for processing (3)
  • apps/client/src/common/hooks/useEntryAction.ts
  • apps/client/src/features/rundown/rundown-event/RundownEvent.tsx
  • apps/client/src/features/rundown/rundown-group/RundownGroup.tsx

Comment thread apps/client/src/common/hooks/useEntryAction.ts Outdated
@alex-Arc alex-Arc force-pushed the group-duration-utils branch from e6c85d1 to f45a014 Compare April 3, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Later will be taken up later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants