feat: Add timer overview and multi submit timer modal - #96
Draft
CrawlerCode wants to merge 1 commit into
Draft
Conversation
There was a problem hiding this comment.
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
TimersOverviewcard on/timerswith greeting, tracked vs unsubmitted stats, and a “Submit all” entry point. - Introduce
SubmitTimersModalfor multi-timer submission, including per-project grouping and validation. - Refactor
TimeEntryto supportpreview[]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> |
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.
No description provided.