All checks were successful
CD / Build and push images (push) Successful in 2m53s
CI / Lint, typecheck, test (push) Successful in 2m8s
CI / Auth e2e pack (push) Successful in 2m31s
CI / Build container images (push) Has been skipped
CD / Deploy to Test (push) Successful in 9s
CD / Smoke tests against Test (push) Successful in 1m13s
CD / Promote to Int (push) Successful in 11s
Build the M4 label experience on top of the #43 label API. - shared: `flattenLabelTree` (tree → depth-first list) for chip lookup, filtering, and the picker; `PageListItemView` adds each page's `labelIds` to the sidebar list response. - api: `GET /ponds/:id/pages` now includes `labelIds` per page (one grouped query), so the sidebar can render chips and filter without extra calls. - web: - Pond settings page (`/p/:pondSlug/settings`) with a `LabelManager` tree: inline create, rename, recolour (`<input type=color>`), move via a parent picker that excludes the label's own subtree, and delete that confirms then force-detaches assigned pages. Every control is a native button/input/select — the tree is fully keyboard-operable. - `LabelPicker` panel on the page editor: searchable, hierarchy-indented multi-select that assigns/unassigns immediately and refreshes the page's labels and the sidebar. - Sidebar: colored label chips on page entries (readable text via a luminance-based contrast helper) and a descendant-inclusive label filter (selecting a parent matches pages tagged with its children, via the shared `collectSubtreeIds`). Owner link to pond settings. - i18n `labels` namespace (de + en). - e2e `labels.spec.ts` (new CI pack): full lifecycle from the settings UI and picker-assign + parent-filter-includes-child. Selectors are language-independent because the UI language follows the user's locale. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PGdhRiwU1WRL4XxJfZYipY
54 lines
2.4 KiB
TypeScript
54 lines
2.4 KiB
TypeScript
import { Route, Routes } from 'react-router-dom';
|
|
|
|
import { RequireAnonymous, RequireAuth, RequireSiteAdmin } from './auth/guards';
|
|
import { AppLayout } from './layout/AppLayout';
|
|
import { AdminSettingsPage } from './pages/AdminSettingsPage';
|
|
import { HomePage } from './pages/HomePage';
|
|
import { NotFoundPage } from './pages/NotFoundPage';
|
|
import { PageEditorPage } from './pages/PageEditorPage';
|
|
import { PondHomePage } from './pages/PondHomePage';
|
|
import { PondSettingsPage } from './pages/PondSettingsPage';
|
|
import { SettingsPage } from './pages/SettingsPage';
|
|
import { TrashPage } from './pages/TrashPage';
|
|
import { ForgotPasswordPage } from './pages/auth/ForgotPasswordPage';
|
|
import { LoginPage } from './pages/auth/LoginPage';
|
|
import { ResetPasswordPage } from './pages/auth/ResetPasswordPage';
|
|
import { SignupPage } from './pages/auth/SignupPage';
|
|
import { VerifyEmailPage } from './pages/auth/VerifyEmailPage';
|
|
|
|
export function App(): React.JSX.Element {
|
|
return (
|
|
<Routes>
|
|
<Route element={<AppLayout />}>
|
|
<Route index element={<HomePage />} />
|
|
|
|
<Route element={<RequireAnonymous />}>
|
|
<Route path="login" element={<LoginPage />} />
|
|
<Route path="signup" element={<SignupPage />} />
|
|
<Route path="forgot-password" element={<ForgotPasswordPage />} />
|
|
</Route>
|
|
{/* Verify/reset work regardless of session state (mail links). */}
|
|
<Route path="verify-email" element={<VerifyEmailPage />} />
|
|
<Route path="reset-password" element={<ResetPasswordPage />} />
|
|
|
|
<Route element={<RequireAuth />}>
|
|
<Route path="settings" element={<SettingsPage />} />
|
|
<Route path="p/:pondSlug" element={<PondHomePage />} />
|
|
{/* Static segment "trash" wins react-router's ranking over the
|
|
dynamic :pageSlug sibling below — a page slugged "trash"
|
|
would be unreachable via direct URL, an accepted v1 gap. */}
|
|
<Route path="p/:pondSlug/trash" element={<TrashPage />} />
|
|
{/* Static "settings" wins over :pageSlug, like "trash" above. */}
|
|
<Route path="p/:pondSlug/settings" element={<PondSettingsPage />} />
|
|
<Route path="p/:pondSlug/:pageSlug" element={<PageEditorPage />} />
|
|
</Route>
|
|
<Route element={<RequireSiteAdmin />}>
|
|
<Route path="admin" element={<AdminSettingsPage />} />
|
|
</Route>
|
|
|
|
<Route path="*" element={<NotFoundPage />} />
|
|
</Route>
|
|
</Routes>
|
|
);
|
|
}
|