Use file mtime for design-spec last-activity #6

Closed
opened 2026-04-05 13:11:05 +02:00 by arne · 0 comments
Owner

Design specs rendered in the project detail page's Design stage always glow sodium (active) because designs.File — the type returned by designs.Source.ListSpecs — doesn't expose a modification time. The web handler passes Active: true unconditionally in web/web.go with a comment explicitly noting the v1 shortcut.

The fix is to extend designs.File with a ModTime time.Time field, populate it from os.Stat in LocalSource and from the Forgejo contents API's last-commit info in ForgejoSource, then update the project handler to compute Active via isActive(spec.ModTime) — the same ActiveWindow = 7 * 24 * time.Hour rule that drives the dot state for every other flow item.

Scope

In bounds: the new field, the two Source implementations, 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 specs rendered in the project detail page's Design stage always glow sodium (active) because `designs.File` — the type returned by `designs.Source.ListSpecs` — doesn't expose a modification time. The web handler passes `Active: true` unconditionally in `web/web.go` with a comment explicitly noting the v1 shortcut. The fix is to extend `designs.File` with a `ModTime time.Time` field, populate it from `os.Stat` in `LocalSource` and from the Forgejo contents API's last-commit info in `ForgejoSource`, then update the project handler to compute `Active` via `isActive(spec.ModTime)` — the same `ActiveWindow = 7 * 24 * time.Hour` rule that drives the dot state for every other flow item. ## Scope In bounds: the new field, the two `Source` implementations, 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.
arne changed title from design-system: use file mtime for design-spec last-activity to Use file mtime for design-spec last-activity 2026-04-05 22:33:59 +02:00
arne closed this issue 2026-04-06 09:44:51 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
arne/orbit#6
No description provided.