Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Merge remote-tracking branch 'origin/main' into next/issue-2154
Adam Eivy320bb194c741
diff --cc .changelog/NEXT.mdindex 34e8ced277,b6db444cb4..ba82d9483d--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@@ -74,7 -74,7 +74,8 @@@- **[issue-2160] WhatsApp import direction inference** — the WhatsApp chat backfill importer now takes an optional "your name in this chat" field. When set, messages from a sender matching that name land as `message.sent` events and everyone else as `message.received` (the same kinds email uses); left blank, messages stay neutral `message` events as before. The preview shows the sent/received split before you commit. Direction isn't part of the dedupe key, so an earlier neutral import isn't double-counted — clear the source's events and re-import to apply the classification.- **[issue-2160] WhatsApp import optional chat label — hardens the cross-chat dedupe collision** — the WhatsApp chat backfill importer now takes an optional "chat label" field. WhatsApp exports carry no stable chat id (the filename differs between a `WhatsApp Chat - Alice.zip` and the bare `_chat.txt` extracted from it), so the content-hash dedupe key was deliberately un-scoped — which meant two DIFFERENT chats that each contained a same-named sender sending an identical message at the same timestamp granularity could collapse into a single event. Supplying a chat label (e.g. "Family group") now folds that stable, user-supplied scope into the dedupe hash so distinct chats key apart, and the label also becomes the displayed chat title. Left blank, the dedupe key is byte-identical to before, so existing imports and their idempotency are unchanged; use the same label consistently for a given chat across re-imports. (`server/services/whatsappImport.js`, `server/routes/timeline.js`, `client/src/services/apiTimeline.js`, `client/src/components/timeline/WhatsappImportPanel.jsx`)- **[issue-2153] YouTube watch history** — YouTube killed its watch-history API, so PortOS ingests your viewing two complementary ways, both landing as `media.watch` events on the activity timeline (taste signal for the digital twin). A new **Settings → YouTube** tab scrapes your signed-in `youtube.com/feed/history` page through the managed browser — off by default and opt-in: log into YouTube in the managed browser, run "Check setup" to confirm you're signed in, set a conservative scrape interval (the history page only shows day-bucketed entries, so a few times a day is plenty), and use "Scrape now" to run immediately. Selector failures degrade to a surfaced sync-status error instead of crashing, and all the page selectors live in one place for easy repair. For reliable historical data (and a fallback whenever the scrape breaks), the **Timeline** page gains a **Google Takeout backfill** importer: upload your "YouTube and YouTube Music → history" export (the ZIP or a single `watch-history.json`) and every watch is imported with its exact timestamp. Both paths share a per-video-per-local-day dedupe key, so a Takeout backfill and the live scrape reconcile without double-counting, and re-imports/re-scrapes are always safe. Like the rest of the timeline, watches are machine-local and never federate to your peers. (`server/services/youtubeSync.js`, `server/services/youtubeImport.js`, `server/services/youtubeScheduler.js`, `server/routes/youtube.js`, `client/src/components/settings/YoutubeTab.jsx`, `client/src/components/timeline/YoutubeImportPanel.jsx`)+- **[issue-2154] Signal Desktop ingestion** — a new **Settings → Signal** tab pulls your Signal Desktop message history into the activity timeline and your Tribe touchpoints, matching conversations to the people you track by phone number (reusing the iMessage phone match). Signal stores its chat database SQLCipher-encrypted with a key wrapped by your macOS Keychain, so PortOS decrypts a temporary **copy** of the database in-process — never touching Signal's live file — using only Node's built-in crypto (no new dependencies): it unwraps the key from the keychain, decrypts the SQLCipher pages, and reads the plaintext copy read-only. Both the legacy plaintext key and the modern keychain-wrapped key (Signal ≥6.2) are supported. It's off by default and opt-in: enable it, set a sync interval, and use "Check setup" to confirm the database and key are reachable (with an actionable message if a keychain prompt or an unsupported Signal version blocks it) or "Sync now" to run immediately. As Signal is the most fragile source — a Signal update can change its key handling or storage format — everything degrades to a clear sync-status error rather than failing hard or retry-looping. Only conversation metadata and a short preview line are stored; full message text stays in Signal's database. Like the rest of the timeline it's machine-local and never federates to your peers, and re-syncs are incremental and idempotent. (`server/lib/signalCrypto.js`, `server/services/signalSync.js`, `server/services/signalScheduler.js`, `server/routes/signal.js`, `client/src/components/settings/SignalTab.jsx`, `client/src/services/apiSignal.js`)+ - **[issue-2160] Gmail full-history backfill** — the **Timeline** page gains a Gmail importer that backfills your entire email history from a Google Takeout "Mail" export into the activity timeline as sent/received message events. Because a Gmail `.mbox` is routinely several gigabytes and won't fit the upload flow the other backfills use, this importer reads it from a local path instead: extract your Takeout Mail export on the machine, then point it at the `.mbox` file (or the whole extracted `Mail/` folder) and it streams the file in place — a multi-gigabyte mailbox never has to be uploaded or held in memory. Only header metadata is read (subject, sender, recipients, date, thread) — never message bodies — matching the timeline's privacy stance. Each message is deduplicated by its email Message-ID, so re-importing the same export (or a newer overlapping one) never double-counts; Preview streams and counts the messages (with a sent/received split, date range, and top correspondents) before you commit. Direction comes from Gmail's own "Sent" label, and an optional "your email" field refines it. Like the rest of the timeline, these events are machine-local and never federate to your peers. (`server/services/gmailMboxImport.js`, `server/routes/timeline.js`, `client/src/services/apiTimeline.js`, `client/src/components/timeline/GmailMboxImportPanel.jsx`, `client/src/pages/Timeline.jsx`)## Privacy Center