f6158f58b5df39b3b4fe837d2ebc446e25c08262
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
298cc4efd6 |
Fix Nextcloud DAV connections on Core: public-IP pin + username-composed prefills
Two bugs made the suggested Nextcloud shares fail on Core: 1. Reachability: nextcloud.$DOMAIN is split-horizon DNS — inside the core network it answers the Nextcloud container's private IP, where nothing listens on 443 (traefik holds TLS on the public address), and netguard refuses private dials anyway. Verified from the core network: the private route refuses connections; the public route answers PROPFIND with 401 (correct credentials-required). The installer's rendered compose now pins nextcloud.$DOMAIN to EXTERNALIP via extra_hosts on the APP service — the exact house pattern the web service already uses for authelia. DNS inside the app container resolves the public address, the dial goes through traefik like any external client, and netguard stays fully strict (no guard relaxation, no trusted-host change). update.sh re-renders compose from the shipped lib, so running cores pick this up on upgrade. 2. Wrong endpoint: Nextcloud's DAV roots are per-user (/remote.php/dav/files/<username>/, /calendars/<username>/), but the WebDAV and CalDAV suggestion prefills handed over the bare /files/ and /calendars/ homes — one level above any valid endpoint. Both now compose the viewer's username into the URL (the URL shown is the URL saved), matching the CardDAV prefill. Dry-rendered the updated compose template and validated it with docker compose config. Regressions updated to assert the composed per-user URLs are what gets POSTed (20/20 PASS incl. the mobile suite); real-stack e2e all PASS; lint/SSR-lint/build clean. API.md and the local AGENTS invariant document the pin and the composition. |
||
|
|
3fe953c14d |
Mobile-friendly UI: responsive shell, phone layouts, drawer navigation
The UI was desktop-first: no viewport meta (phones rendered at ~980px CSS width, killing every breakpoint), an always-inline 240px sidebar squeezing phone content, fixed p-6/100vh chrome, a 6-column bookmarks table, fixed w-60/w-72 rails on collections/tags/contacts, a 12-tab settings strip that overflowed, and w-72 kanban columns. This pass makes every screen usable on a phone while leaving the desktop layout intact. - layout.tsx: viewport meta (width=device-width, initial-scale=1). - app-shell/sidebar: below lg the sidebar is an overlay drawer (closed by default, hamburger opens, backdrop/navigation/resize-to-desktop closes); at lg+ it is the static expand/collapse rail exactly as before. Separate mobileOpen state so closing the drawer never collapses the desktop rail. h-screen -> h-dvh; main p-6 -> p-3 sm:p-6. - lib/use-media-query.ts: hydration-safe useSyncExternalStore media hook (server snapshot false) so surfaces swap whole layouts without duplicating hidden DOM that would break the suites' strict text locators. - bookmarks: table swaps to tappable cards below sm (title/host/status/tags/ updated + open/trash); shared trash handler; detail sheet unchanged. - collections/tags/contacts: rails become master-detail on phones — full-width list first, tap into detail, Back returns; collections no longer auto-jump into the first item on mobile; phone padding. - settings: tab strip scrolls horizontally (triggers shrink-0) instead of overflowing the page. - kanban/collection boards: columns w-[85vw] max-w-72/64 with a peek of the next column; dvh heights. - calendar: compact cells + single-letter weekday headers on phones. - ui/dialog: max-h-[calc(100dvh-2rem)] + internal scroll + phone width guard so tall forms never clip; ui/tabs triggers shrink-0. - top-bar: alerts panel fits 320px; theme/avatar collapse on the smallest widths; hamburger gains an accessible name. - connector settings (MCP/WebDAV/CalDAV/CardDAV): connection rows wrap and the name gets a width floor — the action cluster previously squeezed the name to zero width on phones (a real bug the new mobile test caught). Verification: new mobile regression suite (390x844 context) proves drawer open/close-on-nav, bookmark cards + sheet, tags master-detail + Back, scrollable settings tabs reaching WebDAV, kanban column fits, and zero horizontal overflow on all eight screens; all 19 existing desktop tests still pass (20/20). Real-stack e2e fully passing. yarn lint / SSR eslint / build: 0 errors. |
||
|
|
564bdc87b6 |
WebDAV file shares: connect any RFC 4918 service as a Collection of per-file bookmark URLs
Settings -> WebDAV: a user connects an external WebDAV share (any service; on Core the deployment's NEXTCLOUD_URL offers Nextcloud as a one-click prefill - DATA, never a TIER code fork). The share materializes as a Collection and every file becomes a Bookmark carrying the file's DAV URL, reconciled by the WebDavItem path ledger (migration 020 + schema.sql, db-converge proven): - idempotent syncs; etag changes refresh the ledger only, never user-edited title/notes/tags; same-URL bookmarks are reused (URL-identity invariant); - vanished files detach membership but keep the bookmark (sync never destroys user data); a user-deleted bookmark is a tombstone that is never resurrected; a user-removed membership stays removed - unless the whole collection was deleted, when the next sync re-links every live row; - bounded walks (200 dirs / 1000 files / depth 12) and a truncated listing never reconciles deletions; - netguard-pinned dials (80/443, no trusted exemption for user hosts), Basic auth in a header only, redirects refused outright; - the webdav connector entitlement gates creation AND every sync; a downgrade suppresses instead of deleting; - engine tick per notify/agent discipline (jitter, advisory lease, budget, log-not-fatal); /test proves PROPFIND, /sync reconciles on demand; passwords write-only + masked, PATCH carries version (409 on stale), cap 10 per user. internal/webdav (client+engine), handlers/webdav.go + routes, main.go 4th loop, config.NextcloudSuggestion, Settings tab + webdav-settings.tsx, API.md contract section, env docs, Core installer writes NEXTCLOUD_URL. Client unit tests on an httptest fake DAV server; four integration tests cover lifecycle, recreation, plan gate and suggestion; regressions drive the Settings UI end-to-end (masked rows, prefill, connect/sync/test, no secret echo). All suites green. |