Make article routing legible on the Articles page #113
Labels
No labels
bug
devops
duplicate
enhancement
good first issue
layout
next major release
next minor release
question
research
testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lvl0/fedi-feed-router#113
Loading…
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?
Summary
Every row on the Articles page is a
RouteArticle— a feed × channel pairing. Approving one publishes to that row's channel. The routing is therefore the single most consequential piece of information on the card, but it is currently rendered at the lowest visual rank:text-xs text-gray-500, below the description, tied with the timestamp (resources/views/livewire/articles.blade.php:80-88).The result is a misidentification risk. A user scanning headlines can form a wrong belief about which feed/channel a row belongs to and approve on that belief. The system then does exactly what it was told — the article publishes to the wrong channel, with no error raised anywhere. There is no validation that can catch this, because nothing is technically wrong.
Filtering alone does not solve this: with no filter applied, the default view remains just as ambiguous. The fix is hierarchy first, filtering second.
Current state
app/Livewire/Articles.php:$tab—pendingorall, filters onapproval_status$search— matchesarticle.title/description, only applied when$tab !== 'pending'(line 72, in theelseif) — so search is effectively dead on the pending tabclear()(lines 50-54) rejects every pending row globally, ignoring all filters['article.feed', 'feed', 'platformChannel'], so no new queries are needed for displayfeedstable has no colour column and nosettingskey for one.Scope — four parts, in order
1. Promote the route line
Restructure the card in
articles.blade.php:Feed → Channelabove the headline as an eyebrowtext-xs font-medium, feed nametext-gray-900, channeltext-gray-600→glyphNo schema, no new data. This is the change that addresses the risk; the rest is refinement.
2. Feed colour as reinforcement
feeds.color, nullable string storing a palette key (slate,amber, …), not a hex — keeps Tailwind classes statically analysableFeed::colorClasses()accessor with deterministic fallback (id % palette size) so existing rows get stable colours without a backfillColour is never the sole identifier — the feed name is always present. Beyond ~8 feeds hues stop being distinguishable, and colour-only encoding fails for colour-blind users.
3. Group pending rows by feed
$tab === 'pending', group the paginated collection byfeed_idfor displayOpen decision: a group can straddle a page boundary. Simplest approach is to group only what is on the current page and accept a feed appearing on two pages. Alternative is paginating by feed, which is a larger change. Decide during implementation.
4. Feed filter
public ?int $feedId = nullupdatedFeedId()→resetPage(), matchingupdatedSearch()$query->where('feed_id', $this->feedId)when set$searchinsetTab()$search. Filtering by feed while reviewing pending is the primary use case. This resolves the open question from the original ticket.5. Fix
clear()scopingclear()currently rejects all pending rows regardless of active filters. Once a feed filter exists, a user who has filtered to one feed and clicks "clear" will reasonably expect it to affect only that feed — and will instead wipe the entire queue. Irreversible in one click.clear()to the active$feedIdfilterAcceptance criteria
clear()respects the active feed filter and asks for confirmationclear()scopingCommit sequence
clear()to active filter + confirmAdd feed filter to Articles pageto Make article routing legible on the Articles page