#537 Ongoing durations: an end that is "now"
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#537
- issue
- state:closed
- label:enhancement
Part of #533. Open work items (an assigned issue, a card in progress, a shift not yet clocked out), and history such as "2022–present", need a duration whose end is **now**, still moving, until it is closed. ## Proposal A third kind of duration endpoint, beside a fixed time and `{"moment": id}`: ```json { "id": "issue-412", "start": "1762560000", "end": { "ongoing": true }, "metadata": { "title": "Fix the login loop" } } ``` - **Meaning.** The end is the current time. Closing the duration replaces it with a fixed time (or a moment anchor). Only an `end` may be ongoing. - **Not "uncertain".** An end that happened at an unknown time is a precision question and is out of scope here. - **Only where "now" exists.** Accepted only on timelines whose time display is Gregorian, where a coordinate maps to Unix seconds through the preset's origin and scale. Elsewhere validation refuses it with a clear message. - **Indexes.** An ongoing end is stored as unbounded in the interval trees (browser `durationTree`, the server's AVL index, `native-store/src/intervals.rs`), so cached extents never go stale. It is cut off at the current time only when a band is resolved for a window. - **Drawing.** The band runs to "now" and ends with a fade or an arrow, so it does not read as ending at the view's edge. The duration dialog gets **Ongoing** as a third endpoint choice, and its details say "ongoing". - **Formats and API.** `.ochx`, `.och` (SQLite), the HTTP API and OpenAPI schema, merges and history, and export and conversion (`och-convert`). - **Summaries.** Collapsed-duration summaries and counts treat an ongoing duration as ending now. ## Done when - Ongoing durations round-trip through every format and the API, and are refused on non-Gregorian timelines. - They draw to the current time and keep growing while the page is open. - Tests cover validation, the three interval trees, window queries and summaries. - `docs/durations.md` describes them. https://github.com/openchronology/timeline-app/issues/537
Related
- #533 gantt chart / employee task action tracking integration
- #538 Work-item sources: aggregate GitHub assignments, then Planner and kanban boards
- #539 Let a duration end "now", while it is ongoing (#537, stage 1)
- #540 Save ongoing durations on the server and resolve them at its clock (#537, stage 2)
- #541 Hold ongoing durations in desktop files, ending at the app's clock (#537, stage 3)
- #555 End ongoing durations now where they're drawn and listed; open details without phantom edits
- Mirror GitHub issues and pull requests into timelines
- Save ongoing durations on the server and resolve them at its clock
- Merge pull request #539 from openchronology/feature/ongoing-durations
- Merge pull request #540 from openchronology/feature/ongoing-durations-server
- Refuse ongoing ends in sparse saves to timelines without a calendar
- Merge pull request #541 from openchronology/feature/ongoing-durations-native
- End ongoing durations now where they are listed, and open details without edits
- Keep cached ongoing bands growing to the browser's clock
- Let a duration end "now", while it is ongoing
- Hold ongoing durations in desktop files, ending at the app's clock
Open #537 Ongoing durations: an end that is "now" in the timeline