Template recency
A template that is a repository on this forge says updated 3d ago on its row at /templates, in the Template choices of New forge, and under the selected row of /templates in the terminal. The date is the committer date of the head commit of its default branch (git log -1), or no changes yet when the repository has no commit. Past 180 days the line adds · stale, in the same muted words. Built-in templates (Blank, Starter) have no repository and show nothing.
The read is held 60 seconds per repository and shared by the page, the picker and the terminal. A page waits at most 400 ms for a cold read; a repository not read by then shows no date until the next load. The terminal fills the line in after its first paint, never on a keypress. The time is the shared <time> element (src/web/time_element.ts): relative words, the exact instant in datetime and title; the picker and the terminal speak the same timeAgo words.
- Code:
src/spawn/template_head.ts,src/spawn/template_recent.ts,src/web/pages/templates.ts,src/web/pages/new-forge.ts,src/tui/screens/templates.ts. Test:test/template-head.test.ts,test/templates-alive.test.ts,test/templates-tui.test.ts.