feat(channels): status filter + header full-history link + stable priority

- header: per-user "N without full history" count (channels_deep_pending),
  clickable with a hint -> opens the channel manager filtered to those.
- channel manager: status filter chips (All / Needs full history / Fully synced
  / Hidden); the header link deep-links to "Needs full history".
- fix: priority up/down is now an optimistic in-place cache update (no refetch /
  re-sort), so the list no longer jumps to the top and loses your scroll position;
  the new order applies on the next page load.
This commit is contained in:
npeter83 2026-06-14 07:08:59 +02:00
parent c949630b89
commit aa38e972fd
4 changed files with 92 additions and 10 deletions

View file

@ -21,7 +21,7 @@ import Login from "./components/Login";
import Header from "./components/Header";
import Sidebar from "./components/Sidebar";
import Feed from "./components/Feed";
import Channels from "./components/Channels";
import Channels, { type ChannelStatusFilter } from "./components/Channels";
import Stats from "./components/Stats";
import SettingsPanel from "./components/SettingsPanel";
import OnboardingWizard from "./components/OnboardingWizard";
@ -64,6 +64,7 @@ export default function App() {
const [page, setPageState] = useState<Page>(readPage);
const [settingsOpen, setSettingsOpen] = useState(false);
const [wizardOpen, setWizardOpen] = useState(false);
const [channelFilter, setChannelFilter] = useState<ChannelStatusFilter>("all");
function setFilters(next: FeedFilters) {
setFiltersState(next);
@ -157,6 +158,10 @@ export default function App() {
page={page}
setPage={setPage}
onOpenSettings={() => setSettingsOpen(true)}
onGoToFullHistory={() => {
setChannelFilter("needs_full");
setPage("channels");
}}
/>
<div className="flex flex-1 min-h-0">
{page === "feed" && (
@ -171,6 +176,8 @@ export default function App() {
{page === "channels" ? (
<Channels
canWrite={meQuery.data!.can_write}
statusFilter={channelFilter}
setStatusFilter={setChannelFilter}
onViewChannel={(id, name) => {
setFilters({ ...filters, channelId: id, channelName: name, show: "all" });
setPage("feed");