Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Show state changes and actor/assignee filters in activity

8e93a8f0e42847734facadaa8a56f857ed1a1565 · Keenan Nemetz · 15d ago · parent 2973f727

Show state changes and actor/assignee filters in activity

Issue state changes now write a canonical "issue: <id> <state>" subject, the same shape requests already used, so the feed can read closed, reopened, and merged events from the metadata log without diffing historical files. The CLI and the web share metadata.SetIssueState.

The repository feed filters by type, actor, and assignee. Filters survive type changes and HTMX swaps, and are applied before the 100-event limit so an older matching event is not hidden by newer unrelated ones.

server/web/templates/activity.html +29−6

@@ -16,14 +16,32 @@
16 16 {{define "activity_feed"}}
17 17 <div id="activity-feed">
18 18 <div class="chips" hx-boost="true" hx-target="#activity-feed" hx-swap="outerHTML" hx-push-url="true">
19 <a class="chip{{if eq .Kind ""}} active{{end}}" href="/r/{{.Name}}/activity?kind=all">{{icon "activity"}}All</a>
20 <a class="chip{{if eq .Kind "commit"}} active{{end}}" href="/r/{{.Name}}/activity?kind=commits">{{icon "git-commit-horizontal"}}Commits</a>
21 <a class="chip{{if eq .Kind "issue"}} active{{end}}" href="/r/{{.Name}}/activity?kind=issues">{{icon "circle-dot"}}Issues</a>
22 <a class="chip{{if eq .Kind "change"}} active{{end}}" href="/r/{{.Name}}/activity?kind=changes">{{icon "git-pull-request"}}Changes</a>
23 <a class="chip{{if eq .Kind "release"}} active{{end}}" href="/r/{{.Name}}/activity?kind=releases">{{icon "tag"}}Releases</a>
24 <a class="chip{{if eq .Kind "run"}} active{{end}}" href="/r/{{.Name}}/activity?kind=runs">{{icon "play"}}Runs</a>
19 <a class="chip{{if eq .Kind ""}} active{{end}}" href="/r/{{.Name}}/activity?kind=all{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "activity"}}All</a>
20 <a class="chip{{if eq .Kind "commit"}} active{{end}}" href="/r/{{.Name}}/activity?kind=commits{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "git-commit-horizontal"}}Commits</a>
21 <a class="chip{{if eq .Kind "issue"}} active{{end}}" href="/r/{{.Name}}/activity?kind=issues{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "circle-dot"}}Issues</a>
22 <a class="chip{{if eq .Kind "change"}} active{{end}}" href="/r/{{.Name}}/activity?kind=changes{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "git-pull-request"}}Changes</a>
23 <a class="chip{{if eq .Kind "release"}} active{{end}}" href="/r/{{.Name}}/activity?kind=releases{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "tag"}}Releases</a>
24 <a class="chip{{if eq .Kind "run"}} active{{end}}" href="/r/{{.Name}}/activity?kind=runs{{if .Actor}}&amp;actor={{urlquery .Actor}}{{end}}{{if .Assignee}}&amp;assignee={{urlquery .Assignee}}{{end}}">{{icon "play"}}Runs</a>
25 25 </div>
26 26
27 <form class="filters" method="get" action="/r/{{.Name}}/activity" hx-get="/r/{{.Name}}/activity" hx-target="#activity-feed" hx-swap="outerHTML" hx-push-url="true">
28 <input type="hidden" name="kind" value="{{.Kind}}">
29 <span class="filter-label">Actor</span>
30 <select name="actor" aria-label="Filter by actor">
31 <option value="">Anyone</option>
32 {{range .Actors}}<option value="{{.Name}}"{{if eq .Name $.Actor}} selected{{end}}>{{.Label}}</option>{{end}}
33 </select>
34 {{if .Assignees}}
35 <span class="filter-label">Assignee</span>
36 <select name="assignee" aria-label="Filter by assignee">
37 <option value="">Anyone</option>
38 {{range .Assignees}}<option value="{{.}}"{{if eq . $.Assignee}} selected{{end}}>{{who .}}</option>{{end}}
39 </select>
40 {{end}}
41 <button type="submit" class="secondary">{{icon "sliders-horizontal"}}Filter</button>
42 {{if or .Actor .Assignee}}<a class="button secondary" href="/r/{{.Name}}/activity{{if .Kind}}?kind={{.Kind}}{{end}}">{{icon "x"}}Clear</a>{{end}}
43 </form>
44
27 45 {{if .Events}}
28 46 <div class="activity-list">
29 47 {{range .Events}}
@@ -41,8 +59,13 @@
41 59 </div>
42 60 {{else}}
43 61 <div class="empty-state">
62 {{if or .Actor .Assignee}}
63 <p>No activity matches these filters.</p>
64 <p class="muted">Clear the filters or choose another type.</p>
65 {{else}}
44 66 <p>No activity yet.</p>
45 67 <p class="muted">Push a commit, open an issue, or queue a run.</p>
68 {{end}}
46 69 </div>
47 70 {{end}}
48 71 </div>