You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(channels): record and show whether a channel proposal was auto- or admin-approved #616
With channelProposals.autoApprove on, an admin cannot see which approved channels were auto-approved and which were approved by hand. channel_proposals stores only status, created_at and reviewed_at (cmd/ingestor/channel_proposals.go, submitChannelProposal). Today the only way to tell is to read the database and infer it from reviewed_at ≈ created_at.
Proposal
Schema (ingestor; the server stays read-only). Add a nullable column channel_proposals.approved_by TEXT with the values 'auto' or 'admin'.
Add it as an idempotent migration: ALTER TABLE … ADD COLUMN when missing.
Register it with the self-healing optional-column detection on the server side, so a server/ingestor boot race cannot hide it.
Writes (ingestor).
submitChannelProposal sets 'auto' when autoApprove approves a new name.
Admin approve sets 'admin'.
Reject and revoke clear it. A resubmitted (revoked → pending) row also clears it.
Backfill (one-off, ingestor migration). For existing approved rows, set 'auto' where reviewed_at - created_at < 60000 and otherwise 'admin'. Document that values from before the migration are inferred.
API / UI.
Expose approvedBy on the proposals list used by #/channels?view=proposals, as a named struct field (no map[string]interface{}).
Show it as a small badge ("auto" / "admin") and add a filter "Auto-approved" to that view.
Reflect the filter in the URL hash (deep link), use CSS variables only, and make it work at 390px.
Tests
Ingestor:
auto-approve writes 'auto', admin approve writes 'admin', reject and revoke clear it, and resubmit resets it;
the migration is idempotent;
the backfill classifies the fixture rows correctly.
Server:
the field is present when the column exists and omitted or null on an old DB without it;
the read-only invariant holds.
Frontend:
unit test for the filter and badge;
Playwright test for the filter and its deep link.
Relates to the shared hashtag channels feature (channelProposals).
Activity
dborup commentedon Oct 26, 2026
Fixed by #617 (merged as
b519e6bbac4bb729ede12e9e3e1e908a08566458).