Skip to content

Keep timeline dates tied to note routes#705

Draft
srid wants to merge 5 commits intomasterfrom
fix/timeline-iso-date
Draft

Keep timeline dates tied to note routes#705
srid wants to merge 5 commits intomasterfrom
fix/timeline-iso-date

Conversation

@srid
Copy link
Copy Markdown
Owner

@srid srid commented May 4, 2026

Timeline heatmap backlinks now get their dates from the daily note route, not from the rendered note title. That keeps daily-note detection in the same Haskell parser that already decides whether a backlink belongs in the timeline, so custom-titled daily notes still appear in the heatmap.

The data now flows as a route-derived Day through the backlink splice and into data-iso-date; the browser only groups already-serialized ISO dates.

Calendar.parseRouteDay
  -> daily backlink splice
  -> data-iso-date
  -> timeline heatmap grouping

The smoke fixture now retitles one daily note to cover the regression, and the backlinks guide/changelog describe the route-derived date contract.

Try it locally

nix run github:srid/emanote/fix/timeline-iso-date

Generated by /do on Codex (model gpt-5).

srid added 2 commits May 4, 2026 15:50
Carry the parsed Day from daily backlink classification into the template splice instead of re-parsing the route.
@srid
Copy link
Copy Markdown
Owner Author

srid commented May 4, 2026

Hickey/Lowy Analysis

# Lens Finding Disposition
1 Hickey Daily backlink date was recomputed instead of carried Fixed in this PR
2 Lowy No boundary findings No-op

Hickey rationale

Hickey flagged that the first implementation classified daily backlinks with Calendar.isDailyNote, discarded the parsed Day, then parsed the route again while rendering backlink:note:iso-date. That split one domain value across classification and template data. The follow-up commit 560f44f0 carries the parsed Day through the daily backlink representation and renders data-iso-date from that carried value.

Lowy rationale

Lowy found the boundary aligned with the intended volatility: daily-note route semantics stay in Haskell behind Calendar.parseRouteDay, while timeline JS now consumes a stable ISO-date DOM attribute and only owns browser-side grouping/rendering. No boundary restructuring was needed beyond the carried date refinement above.

Drain the live Emanote subprocess stdout pipe so long morph-mode e2e runs cannot block when the pipe buffer fills.
@srid
Copy link
Copy Markdown
Owner Author

srid commented May 4, 2026

Evidence

The custom-titled daily note still appears in the Timeline as a route-derived daily backlink.

Dailyhost Timeline panel with route-derived daily backlinks

@srid
Copy link
Copy Markdown
Owner Author

srid commented May 4, 2026

/do results

Step Status Duration Verification
sync 1s git fetch ok; forge=github; noGit=false
research 2m 7s Timeline daily backlinks use backlinksSplice in Template.hs; timeline.tpl emits hidden li data-title/data-url; timeline-heatmap.js parses DATE_RE from title. Change: add backlink:note:iso-date from Calendar.parseRouteDay, emit data-iso-date, consume dataset.isoDate, and extend e2e assertion.
branch 10s Created feature branch fix/timeline-iso-date from origin/master
implement 1m 3s Added e2e assertion, Haskell backlink iso-date splice, timeline data-iso-date attribute, and JS parsing from dataset.isoDate instead of title regex
check 1m 27s cabal build all passed via nix develop (ambient shell lacked cabal)
docs 44s Updated backlinks guide and changelog; retitled a daily backlink fixture so e2e covers custom-titled daily notes
fmt 11s just fmt passed (pre-commit: cabal-fmt, fourmolu, hlint, nixpkgs-fmt)
commit 16s Committed 2bde2be fix(timeline): use route dates for heatmap entries and pushed origin/fix/timeline-iso-date
hickey+lowy 5m 22s Hickey found daily date not carried; fixed in commit 560f44f. Lowy found no actions.
police 32s All clear: rules, fact-check, and elegance passes found no actionable violations; cabal build remained up to date
test 1m 33s nix develop -c cabal test all passed; just e2e-static passed; just e2e-live passed
create-pr 27s Created draft PR #705 and posted Hickey/Lowy analysis comment
ci 11m 31s vira ci passed on b35fdcc with vira/aarch64-darwin and vira/x86_64-linux signoffs; just e2e-live, just e2e-static, and just e2e-morph passed
evidence 1m 50s Posted ## Evidence PR comment with screenshot of /dailyhost.html Timeline showing the custom-titled daily note still appears
done 0s Final /do results generated and posted to PR #705
Total 29m 30s

Slowest step: ci (11m 31s)

Optimization suggestions

  • ci dominated this run. For follow-up-only changes on this PR, resume with $do --from ci-only after pushing the fix so the workflow does not replay the earlier implementation/review steps.
  • The morph e2e timeout came from the live-test harness not draining stdout. That is fixed in b35fdccf; future JS/live-server PRs should run just e2e-morph before full CI because it is a fast detector for this class of issue.
  • Hickey/Lowy took 5m 22s and caught a real duplicate-parse concern, so it was worthwhile here. For genuinely mechanical one-line fixes, $do --minimal would avoid that review cost.

Workflow completed at 2026-05-04T20:13:00Z.

srid added 2 commits May 4, 2026 17:12
origin/master now ignores the live e2e server stdout pipe, so the branch no longer needs the separate drain listener.
@srid
Copy link
Copy Markdown
Owner Author

srid commented May 4, 2026

Merged current origin/master (716976d3) into this branch and removed the redundant local stdout-drain listener, so the PR diff no longer includes tests/support/hooks.ts.

Reverified on head 8d2b2009:

  • vira ci passed, including vira/aarch64-darwin and vira/x86_64-linux signoffs
  • just e2e-static passed: 42 scenarios, 3 skipped, 39 passed
  • just e2e-live passed: 42 scenarios passed
  • just e2e-morph passed: 42 scenarios passed

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.

1 participant