Skip to content

feat(feed): collapse per-rule list into a sync-log summary - #1908

Merged
canalesb93 merged 1 commit into
mainfrom
worktree-feed-rule-summary
Jun 24, 2026
Merged

feat(feed): collapse per-rule list into a sync-log summary#1908
canalesb93 merged 1 commit into
mainfrom
worktree-feed-rule-summary

Conversation

@canalesb93

Copy link
Copy Markdown
Owner

What

The sync card in the activity feed listed every rule that fired during a sync — Rule A applied to 4 · Rule B applied to 3 · Rule C applied to 2 · … — which wraps across lines and competes with the card's headline. The sync-log detail page already shows the full per-rule breakdown (the "Rule Hits" section), so the feed only needs a glanceable top-level summary.

This replaces the per-rule loop with a single line — N rules applied · M hits — that links straight to the sync log where the breakdown lives.

Change

  • feedSyncBody (internal/templates/components/pages/feed.templ): the s.RuleOutcomes block is now one <a> linking to /logs/sync-logs/{id} instead of a per-rule list of /rules/{shortID} links.
  • New feedRuleSummaryText helper sums hit counts and pluralizes ("1 rule applied · 3 hits" vs "3 rules applied · 9 hits").
  • Net −20 / +18 LOC, one file.

Evidence

Rendered the real feedSyncBody component with controlled rule-outcome data (the live dev feed only windows the last 3 days, and the only rule-hit syncs are older). Before = the removed per-rule list; After = the new summary.

Feed sync card — before (per-rule list) vs after (summary linking to sync log)

go build ./..., go vet ./internal/templates/..., and go test ./internal/templates/... all pass.

🤖 Generated with Claude Code

The sync card in the activity feed listed every rule that fired during
a sync ("Rule A applied to 4 · Rule B applied to 3 · ..."), which wraps
across lines and competes with the headline. The sync-log detail page
already shows the full per-rule breakdown, so the feed only needs a
glanceable top-level summary.

Replace the per-rule loop with a single "N rules applied · M hits" line
that links to the sync log where the breakdown already lives.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0171yfKuybbwUxB76UezKc14
@canalesb93
canalesb93 enabled auto-merge (squash) June 24, 2026 03:51
@canalesb93
canalesb93 merged commit 79dcd3c into main Jun 24, 2026
8 checks passed
@canalesb93
canalesb93 deleted the worktree-feed-rule-summary branch June 24, 2026 03:53
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