Use file mtime for design-spec last-activity #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Design specs rendered in the project detail page's Design stage always glow sodium (active) because
designs.File— the type returned bydesigns.Source.ListSpecs— doesn't expose a modification time. The web handler passesActive: trueunconditionally inweb/web.gowith a comment explicitly noting the v1 shortcut.The fix is to extend
designs.Filewith aModTime time.Timefield, populate it fromos.StatinLocalSourceand from the Forgejo contents API's last-commit info inForgejoSource, then update the project handler to computeActiveviaisActive(spec.ModTime)— the sameActiveWindow = 7 * 24 * time.Hourrule that drives the dot state for every other flow item.Scope
In bounds: the new field, the two
Sourceimplementations, and the web handler wiring. Out of bounds: any UI changes beyond the dot-state transition, and any consumer of the field besides the project detail page.design-system: use file mtime for design-spec last-activityto Use file mtime for design-spec last-activity