mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
## What
The X bookmarks ("Import X bookmarks") card on the integrations page never reflected any state, even after importing tweets — unlike connectors and plugins, which show "Connected"/"Active".
After this change, once you've imported at least one tweet the card shows an **"Imported · {last import time}"** pill (mirroring the plugin "Active · {time}" style) and is included in the **Connected** filter.
Since importing X bookmarks is a one-time/occasional action rather than a live connection, it intentionally says **"Imported"** with the last-import timestamp, not "Connected".
## Why
The page's status logic (`isItemConnected` + `renderStatus`) only handled the `plugin` and `connector` item kinds. The X bookmarks card is an `import` kind, so it always rendered just "Connect". This was a regression from #979 (the integrations overhaul), which rebuilt the page around item kinds and dropped the previous "{N} tweets imported" indicator.
## How
- Add a single documents query (`@post/documents/documents`, `categories: ["tweet"]`, `limit: 1`, newest first) that yields both the org-wide tweet count (`pagination.totalItems`) and the latest tweet's `createdAt`.
- `isItemConnected` returns `true` for `import` when the count is `> 0`.
- `renderStatus` renders a new `ImportedPill` ("Imported · {relative time}") for `import` when there's ≥1 tweet.
## Testing
- `tsc` and Biome pass; no new errors introduced by this change.
- Verified the status source of truth against a local backend by seeding `type='tweet'` documents — the count/latest-timestamp the pill renders reflect them.
> Note: `tsc` reports two **pre-existing**, unrelated `granola` errors in this file (`CONNECTOR_META` + an icon record missing the `granola` provider). They exist on `main` and are not touched by this PR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
||
|---|---|---|
| .. | ||
| add-document | ||
| brain-home | ||
| chat | ||
| document-cards | ||
| document-modal | ||
| integrations | ||
| mcp-modal | ||
| memory-graph | ||
| nova | ||
| onboarding | ||
| onboarding-brain | ||
| settings | ||
| text-editor | ||
| add-space-modal.tsx | ||
| animated-gradient-background.tsx | ||
| bottom-nav.tsx | ||
| connect-ai-modal.tsx | ||
| dashboard-view.tsx | ||
| digests-view.tsx | ||
| document-icon.tsx | ||
| documents-command-palette.tsx | ||
| edit-space-modal.tsx | ||
| ensure-workspace.tsx | ||
| error-boundary.tsx | ||
| feedback-modal.tsx | ||
| fullscreen-note-modal.tsx | ||
| granola-connect-modal.tsx | ||
| graph-layout-view.tsx | ||
| header.tsx | ||
| highlights-card.tsx | ||
| initial-header.tsx | ||
| integration-icons.tsx | ||
| integrations-view.tsx | ||
| login-tools-panel.tsx | ||
| memories-grid.tsx | ||
| next-app-research-cta.tsx | ||
| org-plan-badge.tsx | ||
| pwa-install-prompt.tsx | ||
| query-client.tsx | ||
| quick-note-card.tsx | ||
| remove-connection-dialog.tsx | ||
| select-spaces-modal.tsx | ||
| share-modal.tsx | ||
| space-folder-icon.tsx | ||
| space-glyph.tsx | ||
| space-profile-modal.tsx | ||
| space-profile-panel.tsx | ||
| space-selector.tsx | ||
| spinner.tsx | ||
| superloader.tsx | ||
| timeline-view.tsx | ||
| user-profile-menu.tsx | ||
| utils.ts | ||