Repository navigation
Add the Time app: Find a time, Convert and Duration - #26
Merged
Merged
Conversation
Starting point taken from the test_2 run, moved onto current main (typecheck with bun check, lockfile refreshed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Time - A window is now read one offset at a time (offsetSpans in zone.ts). In an hour the clocks repeat, a window is there twice with the gap between left out, rather than one stretch from its first start to its last end, which let a call run through time nobody marked. In a skipped hour, only the part that does not exist is dropped, not the whole window. - The whole call ends within the dates searched. - No suggestions while someone's zone is unknown: times found without them read as times that suit everyone. - A saved plan or share link with a higher version than this page knows is not read as this one; saved people are left untouched and the page says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch suggestion - Unix input is read from its digits: 1.001 seconds was 1000 ms after floating-point multiplication. Digits past milliseconds are now noted for Unix times too, as they already were for ISO dates. - Each Find a time suggestion lists everyone's own clock at the start, with their date where it differs from the one shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24-hour clock, in every app: - Times are formatted with hourCycle h23 whatever the browser's language (Time, JWT's claim dates, the SVG app's document list). - Times of day are typed .ui-clock fields (@tools/ui clock.ts: parseClock, formatClock, bindClockFields), never native time or datetime-local fields, which follow the language into AM/PM. Time and Codes (an event's start and end, each a date and a time) use them; moved to the shared package now that a second app needs it. AGENTS.md says so. - Time's 12/24 setting and its Settings menu go; old saved prefs still read. The header was measured again: compactHeader 450, views to a dropdown below 363px. Find a time: a window is two lines, its remove button in the corner; a chevron shows a person folds; the example is two people in two zones with one window each, and a new person one window. Convert: Now writes the unit chosen; the date and time pickers update the input as they change, not once the picker closes. Duration: no presets, just From and To with Now (To starts on Now); the next-anniversary line serves any past date; Elapsed drops Weeks and says each line is the whole span in that unit; an unreadable time says so instead of counting from midnight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Dates are typed YYYY-MM-DD fields across the site, as times are 24-hour ones: @tools/ui's time-fields.ts (was clock.ts) adds .ui-date with parseIsoDate / formatIsoDate, and a field written out in full on leaving tells the page with an input event. Time and Codes use them. - Find a time is the first view, and a new tab opens on it. - A person is removed with a red bin beside the chevron, over the card's row rather than inside its summary, so it works folded or not. - The example and a new person keep business hours: 09:00 to 17:00 on weekdays, Alex in Paris and Sam in New York. - The call is placed on the best suggestion until someone places it themselves; new dates or an opened link put it back. - Convert: Seconds and Milliseconds rewrite the timestamps typed in that unit, the same instant, instead of reading the digits again. - Duration: only one end can be now; switching one on frees the other. - The tab's draft is also saved as the page is left, so a reload just after an edit keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Suggestions fold to their heading and count, open by default: the heading is a disclosure button and its whole row takes a click; kept in the draft. - A reload no longer shows Find a time for a moment before the view the tab was on: a script in the head reads the draft and marks <html> with the view (and Suggestions folded) before the body paints; the page's styles show the view from that, and a second small script presses its header button. main.ts keeps the attributes from then on. - @tools/ui withIcons fills an icon whose closing tag Prettier wrapped (</svg\n>); it was skipped silently, shipping a blank icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…N's view from the first paint - Time: pressing on the timeline places the call and dragging moves it live, a quarter hour at a time; grabbed on the call, it keeps its hold. Pointer capture stays with the timeline's container as the rows are drawn again. - Time: the legend names the call (the outlined box) and now (the red line). - Time: Suggestions start folded, since the call is already placed on the best one; opened, they stay open in the tab. Why nothing fits moves out of the fold, so it shows either way. - JSON: a reload pressed the JSON view button for a moment before the view kept in the settings. A script after the header presses the right one from the first paint, as Time does; tested with the app's script blocked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The search covered whole days from midnight, so today's suggestions began hours behind the clock. It now starts at the next quarter hour from now, says so when no time is left in its dates, and searches again as each quarter hour passes while the page is open. A call placed in the past by hand says so. The browser tests run Find a time at a fixed moment (page.clock), the evening before the day they search. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI on Linux failed what passed on Windows: - Linux fonts make the full Time header 482px (450px on Windows), so compactHeader is 482, and the views become a dropdown below 400px rather than 363px (measured on Windows, plus what Linux adds; the header test checks 390px and 420px). - WebKit on Linux writes a short date "Mon, 12 Oct", others "Mon 12 Oct": the browser tests accept either. Co-Authored-By: Claude Opus 5.5 <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.
Adds Time (stable), the next app on the roadmap: find a call time for people in several zones, convert timestamps and dates across zones, and measure durations and ages. Described in
docs/apps/time.md.Time
#plan=).PLAN_VERSION); a plan from a newer version is refused, not misread.Across the site
YYYY-MM-DDand times 24-hour in every app, whatever the browser's language:@tools/uitime-fields.ts(.ui-date/.ui-clock), used by Time and Codes; JWT and SVG format times withhourCycle: "h23".AGENTS.mdrecords the rule.@tools/ui(second user).withIconsfills an icon whose closing tag Prettier wrapped (</svg\n>), which shipped blank before.Checks
bun run verifyand the full browser suite (Chromium and WebKit) pass locally.🤖 Generated with Claude Code