Skip to content

feat: Add timer overview and multi submit timer modal - #96

Draft
CrawlerCode wants to merge 1 commit into
betafrom
feat/multi-submit-timers
Draft

feat: Add timer overview and multi submit timer modal#96
CrawlerCode wants to merge 1 commit into
betafrom
feat/multi-submit-timers

Conversation

@CrawlerCode

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI 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.

Pull request overview

Adds a new timers “overview” card to the Timers route and introduces a bulk “submit all timers” modal that can create multiple Redmine time entries and remove submitted timers, alongside a refactor of the time-entry bar component to support multiple preview segments and different sizes.

Changes:

  • Add TimersOverview card on /timers with greeting, tracked vs unsubmitted stats, and a “Submit all” entry point.
  • Introduce SubmitTimersModal for multi-timer submission, including per-project grouping and validation.
  • Refactor TimeEntry to support preview[] segments and sizing; update existing callers accordingly.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/routes/timers.tsx Renders the new overview card (and skeleton) on the timers page.
src/lib/utils.ts Adds omitUndefinedFilter helper used for filtering project IDs.
src/lang/en.json Adds i18n strings for the overview card and submit-timers modal.
src/lang/de.json Adds German i18n strings for the new overview/modal UI.
src/lang/fr.json Adds i18n keys for the new overview/modal UI.
src/lang/ru.json Adds i18n keys for the new overview/modal UI.
src/hooks/useTimers.ts Broadens deleteTimer input type to Pick<Timer, "id"> for flexible callers.
src/components/ui/form.tsx Adds min-w-0 to FormFieldset to improve layout/truncation behavior.
src/components/timer/TimersOverview.tsx New overview card component with tracked time display and “Submit all” entry point.
src/components/timer/SubmitTimersModal.tsx New bulk submit modal that creates multiple time entries and deletes submitted timers.
src/components/timer/ProjectTimersGroup.tsx Exports TimerProject and adds forceNoSticky option for modal usage.
src/components/time-entry/TimeEntryPreview.tsx Updates usage to new TimeEntry preview API.
src/components/time-entry/TimeEntryOverview.tsx Updates usage to new TimeEntry sizing/scaling behavior.
src/components/time-entry/TimeEntry.tsx Refactors the bar rendering to support preview[] and size variants.
src/api/redmine/hooks/useRedmineProjectTimeEntryActivities.ts Refactors activity resolution and adds multi-project activities hook used by bulk submit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +131 to +141
.map(
({ timer, issue, hours }) =>
({
_timer_id: timer.id,
_included: (hours > 0) as true,
issue_id: issue.id,
hours,
activity_id: projectTimeEntryActivitiesMap[issue.project.id]?.defaultActivity?.id,
comments: timer.name ?? null,
}) satisfies Partial<Exclude<TSubmitTimersForm["entries"][number], { _included: false }>> as TSubmitTimersForm["entries"][number]
),
Comment on lines +80 to +84
<CardAction>
<Button size="sm" disabled={!canSubmitTimers} onClick={() => setIsSubmitTimersModalOpen(true)}>
<BadgeCheckIcon />
{formatMessage({ id: "timers.overview.submit-all" })}
</Button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants