supermemory/apps
sreedharsreeram 313a8df6a6 feat(web): show import status on X bookmarks integration card (#1130)
## 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)
2026-06-18 04:43:06 +00:00
..
browser-extension feat: add chat memory imports to extension (#1115) 2026-06-17 04:08:44 +00:00
docs Move Granola connector to Pro plan (#1132) 2026-06-17 17:48:04 +00:00
mcp Revert "fix(mcp): clarify memory graph pagination (#1032)" (#1133) 2026-06-17 17:16:22 +00:00
memory-graph-playground fix(deps): bump next to 16.0.7 in memory-graph-playground (critical CVE) (#1082) 2026-06-16 21:10:32 -07:00
raycast-extension feat: mobile responsive, lint formats, toast, render issue fix (#688) 2026-01-21 03:11:53 +00:00
web feat(web): show import status on X bookmarks integration card (#1130) 2026-06-18 04:43:06 +00:00