Commit Graph

3 Commits

Author SHA1 Message Date
14170fe5aa Send the filter names ipx actually understands (#6)
The Pinned tab was not filtering. It sent filter=pinned, and Filter::parse
in db.rs knows unread, downloaded, flagged and in_progress and falls
through to All for anything else -- so the tab returned every item and
looked like it had worked. The column is still named flagged, for what it
was before the interface called it pinned, and the page had this right all
along.

Currently Listening was worse in kind. ipx has filter=in_progress for
exactly it: started past the first few seconds, short of the 90% the UI
calls finished, measured against the length this person's player reported
where there is one. The client asked for everything and trimmed the fifty
rows it happened to receive, so the view showed whichever started episodes
were near the top of the library, left out the rest, and counted wrong.

Both came of writing the filter names from the interface's words instead of
reading what the server parses.

The tests now assert what each filter means rather than how many rows it
returns -- every unread row unread, every downloaded row with a file, every
pinned row pinned, every in-progress row started -- because the failure
here was a full page of entirely plausible rows, which no count would have
caught. Pinned also has to match fewer than everything, which is the shape
the bug took.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 09:56:28 -04:00
292941524e A native item pane, with the show notes still HTML (#4)
The reading pane: the item, its files with play, download and delete, read
and pin in the toolbar, a link to the original, and the notes.

The notes are a web view, deliberately. They are feed-supplied HTML that
ipx has already run through ammonia, and there is no good native renderer
for that -- NSAttributedString(html:) is slow, single-threaded and ugly,
and writing a real one is a project. So this carries only the notes, with
just enough stylesheet to belong to the app: the system font at body size,
the label colours, links in the accent. Nothing else is imposed, because
the markup is the publisher's. A link opens in Safari rather than inside
the view, where it would replace the notes with somebody's website and
leave no way back.

Deleting asks first, and says when the file is shared: one file serves
everyone reading the feed, so removing it is not a private act.

Two goes at the navigation. A row with a selection binding on the list
highlighted and went nowhere -- the binding takes the tap before the link
sees it. Without the binding, NavigationLink(value:) with a matching
navigationDestination still pushed nothing and gave no reason, so the link
carries its own destination now, which has nothing to get wrong.

Fourteen tests pass. The new one opens an item and looks for its notes, its
delete button and its read control, so a pane that renders empty fails
rather than passing quietly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 09:34:34 -04:00
01d8bd936e A native feed list and item list (#3)
The lists are native now, and the page is a button in the toolbar: it is
still where signing in happens, and it is still the whole of settings, the
admin page, the directory and OPML, which were never going to be rewritten.

LibraryStore holds a page of items and asks for the next, because the
sorting, filtering and searching are the server's work and ten thousand
items have no business being in memory to be sorted here. Read and pinned
are set locally and sent after, as the page's readWrites map does and for
the same reason: a list asked for before the write lands answers with the
old state, which put the dot back on an item just read.

The interface follows the account's light or dark rather than the phone's,
and defaults to dark when nobody has chosen, because that is what ipx's own
theme.ts does. Following the system instead put a light list in front of a
dark page. preferredColorScheme was not enough on its own -- inside a
hosting controller it did not reach the hierarchy -- so the style is
overridden on the controller, which also carries to the page presented over
it.

The sidebar had to be broken into sub-views: the whole list in one
expression was more than the type checker would work through, and it said
so rather than compiling it.

Tested against the real library, 135 feeds and eleven thousand items, and
the playback test now drives the native row rather than the page's button.
Thirteen pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 09:27:03 -04:00