Repository navigation
feat: add optional start date to planning initiatives - #283
Merged
Merged
Conversation
Initiatives previously only had a deadline, with the timeline bar starting at the creation date. Add an optional startDate across the form, timeline, localStorage, Supabase (new start_date column + migration), and the SQL backend (column auto-added to existing databases). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpYBKifQTutKUHHgtRMNTM
Deploying timetrackerpro with
|
| Latest commit: |
cc38266
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://212856df.timetrackerpro.pages.dev |
| Branch Preview URL: | https://claude-happy-mayer-ugxqpj.timetrackerpro.pages.dev |
The Specific date picker now opens on today's local date and the Quarter picker's year on the current year. Start date stays blank. Edit mode keeps saved values and only falls back to the defaults when switching deadline type. Claude-Session: https://claude.ai/code/session_01WpYBKifQTutKUHHgtRMNTM
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
Planning initiatives only had a deadline, so every timeline bar started at the initiative's creation date. This adds an optional start date so a bar can cover the full start-to-deadline scope, and pre-fills the deadline pickers with sensible defaults.
Type of Change
Related Issue
N/A
Changes Made
InitiativeSheet.tsx: new optional "Start date" field. A deadline before the start date is rejected. An explicit start date replaces the creation-date floor on the deadline, so past work can be logged retroactively. Clearing the field in edit mode unsets it.InitiativeSheet.tsx: the deadline pickers open pre-filled. "Specific date" defaults to today's local date and "Quarter" defaults its year to the current year (the quarter is still chosen by the user). Start date stays blank. Edit mode keeps saved values and only falls back to these defaults when switching deadline type.InitiativeTimeline.tsx: bars run fromstartDate(falling back tocreatedAt) to the deadline. The label reads "Start – Deadline" when a start is set.initiativeUtils.ts:resolveInitiativeStart,isDeadlineBeforeStart(local-day comparison, same UTC-midnight care as the existing helpers), andtoLocalDateString.TimeTrackingContext.tsx:Initiative.startDate?: string.start_date, new migrationsupabase/migrations/20261110_initiative_start_date.sql. SQL backend repository mapsstart_date, andserver/schema.tsadds the column to existing databases on startup. Guest localStorage andSqlApiServicepass the full object through, so they needed no change.CHANGELOG.md,README.md,README-EXT.md,AGENTS.md.Checklist
Documentation
README.mdCHANGELOG.mdupdated accordinglyGeneral
mainpnpm test,pnpm lint, andpnpm buildNotes for Reviewers
20261110_initiative_start_date.sqlagainst existing Supabase projects before this ships, otherwise initiative upserts will fail on the unknownstart_datecolumn.AGENTS.mdlistspnpm check:design-tokens,pnpm lint:markdown, andpnpm check:a11yas pre-commit steps, but none of those scripts exist inpackage.json, so they were not run.Co-Authored-By:trailer that the repo'sAGENTS.mdforbids; removing it needs a history rewrite and force-push.