Skip to content

feat: add desktop subscription group management - #32

Merged
Priveetee merged 34 commits into
TypeType-Video:devfrom
kapdon:codex/subscription-groups-ux
Sep 26, 2026
Merged

Priveetee merged 34 commits into
TypeType-Video:devfrom
kapdon:codex/subscription-groups-ux

Conversation

@kapdon

@kapdon kapdon commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Add a desktop subscription group manager at /subscriptions/groups, opened from Subscriptions → Channels → Manage groups, following the placement discussion.

Refs TypeType #172. Paginated membership reads and selected-channel refreshes use the API merged in TypeType-Server #86 (576a0241 on dev). This PR stays a draft until the Firefox/WebKit and live-server acceptance pass is recorded.

  • Fetch and render server pages directly. Search, named/ungrouped membership filters and the In group / Not in group toggle run through the merged page contract. Select page selects the visible page; previously selected channels and unsaved edits remain available across pages and filters. A bounded lookup refreshes explicitly selected channels, including those outside the current page. The inline editor and save calculations use these refreshed records while preserving unsaved drafts.
  • Create, rename and delete groups. One selected channel opens a searchable group combobox; multiple selections use bulk actions with the active sidebar group as the default target. Keep TypeType's square controls, theme tokens and compact desktop layout, with both lists' pagination visible.
  • Respect the API's 500-URL, 2048-character and 1 MiB limits. Run at most three membership writes concurrently, skip no-op changes and target cache refreshes. Keep partial-edit drafts; pause editing after failed data refreshes and expose Retry without replaying successful writes.
  • Add filtered Channels/Videos views, structured API errors, request cancellation, stale-group recovery, accessible group action menus and English/French/German messages. Preserve the empty-account path and independent filtered feed cursors.
  • Include the local 150-channel/18-group fixture (bun run dev:groups-fixture) with overlapping memberships and the merged paginated contract: endpoint validation, lookup limits and body-size rejection mirror the server. No new Markdown files are included.

Scope and acceptance criteria

Desktop group CRUD, inline/bulk membership editing, server pagination/search, retained selections and error recovery are included. Compact mobile composition and organization of only newly imported channels are explicitly deferred; the post-import link opens the full manager. The stacked narrow-screen fallback is not the proposed mobile workflow. This is a partial implementation of #172 and does not close that issue.

Validation

  • bun run check, bun run test (394 passed), bun run knip, bun run sherif, bun run build and git diff --check passed after merging dev.
  • Query/API regressions cover independent page/filter caches and feed cursors, cancellation, structured errors, byte-safe batches, bounded concurrency, off-page selection refresh, stale page records versus refreshed inline edits, retained drafts, partial writes and refresh recovery.
  • Chromium checks with the fixture cover cross-page selection/drafts, server request parameters, group search and inversion, last-page adjustment after removal, default bulk targets, action-menu keyboard behavior, Retry recovery, and saving the intended memberships after an external change; the core paging, search, inversion and selection flows were rerun after the fixture contract sync on 2026-09-24. The latest 1280 × 720 desktop view fits without document scrolling.
  • TypeType-Server #86 merged into dev as 576a0241 after its full suite (1,251 passed, 3 skipped), build, OpenAPI and coverage checks passed against PostgreSQL 16, including route/service tests with 25,000 channels and 112,500 memberships, Unicode search and account isolation. The merge includes the maintainer's follow-up (trigram search indexes, shared read locks, read-only avatar enrichment).
  • Firefox/WebKit and a browser session against the running Kotlin server remain unverified. Vite retains its existing large-chunk warning; Knip reports two existing stale ignore hints.
  • Each commit added here has fewer than 300 insertions; 890b86c merges origin/dev (conflicts resolved in the message catalogs and authedJson).

Latest desktop preview

Disposable fixture data, with Cooking selected, its matching bulk target and the inline group combobox open.

Latest subscription group manager with server pagination and inline group editing

@kapdon

kapdon commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Hey @Priveetee, where would you like the group management page to live?

Currently it is accessed through a Manage groups button under Subscriptions → Channels, as shown below. Would you prefer to:

  • Keep it as a separate page accessed from Channels;
  • Add a Groups tab next to Channels; or
  • Replace the current Channels page with the new management view, since the current page is mainly a list of subscribed channels?

Current placement (desktop preview with sample data):

Channels page with the Manage groups button at the upper right, below the Videos and Channels tabs

@Priveetee

Copy link
Copy Markdown
Member

Mmmh, I think that keeping it as a separate page for now makes the most sense, opened through the Manage groups button under Subscriptions → Channels.

This keeps the existing Videos / Channels navigation simple and preserves Channels as the normal subscription list, while the group manager stays focused on organization. I wouldn’t replace the Channels page.

We can revisit a dedicated Groups tab later if discoverability becomes an issue. For now, the current placement feels right to me.

@Priveetee

Copy link
Copy Markdown
Member

And please don't forget to split ur commit ;p

@kapdon
kapdon force-pushed the codex/subscription-groups-ux branch from 4405d41 to 8683521 Compare September 15, 2026 21:44
@kapdon
kapdon marked this pull request as ready for review September 16, 2026 15:25
Comment thread apps/web/src/components/subscription-groups/group-channel-list.tsx Outdated
Comment thread apps/web/src/hooks/use-subscription-feed.ts
Comment thread apps/web/src/lib/api-subscription-groups.ts Outdated
Comment thread apps/web/src/routes/subscriptions_.channels.tsx
Comment thread apps/web/src/routes/subscriptions_.channels.tsx Outdated
Comment thread apps/web/src/components/subscription-groups/group-sidebar-item.tsx Outdated
Comment thread apps/web/src/components/subscription-group-filter.tsx Outdated
Comment thread apps/web/src/hooks/use-group-manager.ts
Comment thread apps/web/src/routes/subscriptions.tsx
Comment thread apps/web/src/hooks/use-subscription-feed.ts Outdated

@Priveetee Priveetee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through the PR again. I like the direction of the UI and the amount of work that went into it! :)

There are two important points I’d like to sort out before merging.

The first one is the channel-list pagination. The UI only slices props.channels after /subscriptions/group-memberships has already returned and parsed the complete membership projection. The Server also builds that complete projection in memory before sending it. With a large subscription list, the first page still waits for the full response, all database work, and all browser allocations. Changing page only changes which already-loaded rows are rendered.

This matters for TypeType #172, which is specifically about managing large subscription lists. Could we move page, limit, search, and group-membership filtering into the Server contract, return the requested page with its total count, and add the matching OpenAPI and route/service tests? The frontend could then render the returned page directly instead of paginating a complete in-memory projection.

I’d also like to keep this PR focused on the actual frontend implementation and its tests. Could you remove all Markdown files introduced by the PR: DESIGN.md, PRODUCT.md, docs/subscription-groups-fixture.md, and docs/subscription-groups-ux.md? I don’t want any new .md files in this PR. They contain planning notes, design summaries, fixture instructions, and verification claims rather than files required for the feature itself. Some of the claims are also ahead of the current implementation, especially the statement that selection works across every page while the complete list is still loaded up front.

Once the pagination contract is handled on the Server side and the extra Markdown files are removed, I’ll gladly review the PR again! ;)

If you need a hand with the Server-side code or the integration, don’t hesitate to ask, I’ll be happy to help! :)

@kapdon
kapdon marked this pull request as draft September 17, 2026 11:06
@kapdon

kapdon commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Hey @Priveetee, I marked this ready for review too early by mistake—sorry for the premature signal. It is back in draft while the coordinated frontend/server change is reviewed.

Following your latest review:

  • TypeType-Server #86 adds SQL pagination, search, membership filtering and totals, with OpenAPI and route/service tests. This PR now renders returned pages directly and retains explicit selections through a bounded lookup.
  • Removed all four added Markdown files and the design-planning metadata.
  • Replied individually to all 16 inline comments with the changes or the explicit desktop/import scope deferrals.

Frontend checks passed (376 tests), and the server checks passed (1,248 tests, 3 skipped). Firefox/WebKit and a browser session against the running Kotlin server still need verification.

Latest desktop UI at 1280 × 720, using the disposable 150-channel fixture:

Latest subscription group manager with server pagination and inline group editing

@Priveetee

Copy link
Copy Markdown
Member

oki doki np, take ur time :)

@kapdon
kapdon force-pushed the codex/subscription-groups-ux branch from 5ff837d to 915c9c6 Compare September 23, 2026 16:34
@kapdon

kapdon commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

I think this is in a decent state for review now.

next I'll probably work on the import export flow in the mock,

import completes → show what was restored → optionally organize channels → finish, with grouping remaining optional. #32 already gives us much of the manager UI, pagination, selection and membership handling to reuse. Its current post-import link opens the full manager we can probably reuse a lot of the components here.

anything I should be aware of? one thing that came up is group merging / duplication handling in imports we need a new route and flow for. and probably other stuff I'm forgetting.

@kapdon
kapdon marked this pull request as ready for review September 23, 2026 18:17
@Priveetee
Priveetee dismissed stale reviews from themself September 26, 2026 17:56

Dismissed after all review threads were resolved and the requested changes were validated.

@Priveetee

Copy link
Copy Markdown
Member

Thx a lot for all ur work, u can be proud of urself, LGTM ;P

@Priveetee
Priveetee merged commit b05eb25 into TypeType-Video:dev Sep 26, 2026
4 checks passed
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.

3 participants