supermemory/apps/web
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
..
app add weekly digests, log, and opt out options (#1107) 2026-06-18 01:06:40 +00:00
components feat(web): show import status on X bookmarks integration card (#1130) 2026-06-18 04:43:06 +00:00
hooks add weekly digests, log, and opt out options (#1107) 2026-06-18 01:06:40 +00:00
lib add weekly digests, log, and opt out options (#1107) 2026-06-18 01:06:40 +00:00
public add weekly digests, log, and opt out options (#1107) 2026-06-18 01:06:40 +00:00
stores fix: multi-select propagation bug and redesign selection toolbar (#901) 2026-05-05 22:35:35 +00:00
.env.example feat: deep-research on user profile and tiptap integration (#672) 2026-01-15 21:53:53 +00:00
.gitignore sentry sourcemaps 2025-08-23 09:55:40 -07:00
biome.json feat: mobile responsive, lint formats, toast, render issue fix (#688) 2026-01-21 03:11:53 +00:00
components.json New Version of Supermemory Consumer App 2025-08-16 18:50:10 -07:00
globals.css Grok 4.3, web sources UX, and mobile polish (#1064) 2026-06-08 12:34:15 +05:30
instrumentation-client.ts feat: warning when model is unavailable in the region (#814) 2026-03-28 05:52:41 +00:00
middleware.ts Make integrations page public for guests (#1073) 2026-06-09 17:32:00 +00:00
next.config.ts Rewrite @supermemory/memory-graph with perf optimizations + consolidate consumers (#809) 2026-03-28 19:06:27 -07:00
open-next.config.ts feat: mobile responsive, lint formats, toast, render issue fix (#688) 2026-01-21 03:11:53 +00:00
package.json feat(web): make brain onboarding the default flow (#1067) 2026-06-09 17:13:32 +00:00
postcss.config.mjs feat: mobile responsive, lint formats, toast, render issue fix (#688) 2026-01-21 03:11:53 +00:00
README.md New Version of Supermemory Consumer App 2025-08-16 18:50:10 -07:00
tsconfig.json fix 2026-02-09 22:07:09 -08:00
wrangler.jsonc feat: mobile responsive, lint formats, toast, render issue fix (#688) 2026-01-21 03:11:53 +00:00

supermemory Consumer