Skip to content

feat(twitter): surface tweet id on bookmarks/likes/tweets listings#1301

Merged
jackwener merged 1 commit intomainfrom
feat/twitter-listing-id-consistency
May 4, 2026
Merged

feat(twitter): surface tweet id on bookmarks/likes/tweets listings#1301
jackwener merged 1 commit intomainfrom
feat/twitter-listing-id-consistency

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

Round 6 silent-drop audit follow-up. The canonical tweet id (rest_id) is inconsistent across twitter listings:

Listing id exposed in columns?
timeline
search
list-tweets
notifications
bookmarks ✗ → fixed
likes ✗ → fixed
tweets ✗ → fixed

Each row object already contained id — only the columns projection was missing, so JSON output (-f json) already had it but the table view didn't. Same bug class as PRs #1284 / #1285 / #1288 / #1289 / #1291 / #1293 / #1300.

With the listing↔detail id-pairing CI gate from #1297 now active on main, surfacing id lets the table view round-trip into twitter thread <id> / twitter like <id> / twitter delete <id> etc., not just -f json.

Changes per file

  • bookmarks: columns[id, author, text, likes, retweets, bookmarks, created_at, url]
  • likes: columns[id, author, name, text, likes, retweets, created_at, url, has_media, media_urls]
  • tweets: columns[id, author, created_at, is_retweet, text, likes, retweets, replies, views, url, has_media, media_urls]

While at it, aligned created_at / retweets / name projections with sibling adapters where those values were already emitted but dropped from columns.

Test plan

  • npx vitest run clis/twitter/ — 81/81 pass
  • tweets.test.js had a strict toEqual on the columns array — updated it to match new shape
  • npm run check:listing-id-pairing — passes (no longer relies on URL fallback for these listings)
  • npx tsx src/build-manifest.ts — 660 entries, columns delta only

Audit context

This PR is one fix from a wider silent-drop audit run earlier today (15 listings across 8 sites). Other findings (1688/search dropping offer_id, hupu/mentions dropping tid/pid, douban/photos dropping photo_id, etc.) will follow as separate focused PRs after this one lands.

Round 6 — silent-drop audit follow-up. Sibling twitter listings have
been inconsistent about the canonical tweet `id` (rest_id):

- timeline      ✓ exposes id
- search        ✓ exposes id
- list-tweets   ✓ exposes id
- notifications ✓ exposes id
- bookmarks     ✗ extracts but drops it from columns
- likes         ✗ extracts but drops it from columns
- tweets        ✗ extracts but drops it from columns

The `id` is already in the row object — only the `columns` projection
was missing. With the listing↔detail id-pairing CI gate from #1297 now
on main, surfacing `id` makes round-trip into `twitter thread <id>` /
`twitter delete <id>` / `twitter like <id>` work from the table view too
(previously only via `-f json`).

Other field-presentation drift (`name`, `created_at`, `retweets`)
aligned with sibling adapters where those values are already emitted.

Tests: tweets.test.js asserts `toEqual` on the columns array — updated
that assertion. Other twitter tests use `toMatchObject` and pass
unchanged. 81/81 in `clis/twitter/`.
@jackwener jackwener force-pushed the feat/twitter-listing-id-consistency branch from 93670e4 to 4db731b Compare May 4, 2026 13:19
@jackwener jackwener merged commit ae9ad4a into main May 4, 2026
11 checks passed
jackwener added a commit that referenced this pull request May 4, 2026
…(sweep) (#1305)

* feat(youtube/xiaohongshu/xiaoe): surface dropped ids/url on listings (sweep)

Round 8 same silent-column-drop class as #1300/#1301/#1302 — row already
emits the id/url field but `columns` array forgot to project it, so table
view drops it and agent loses the chain into detail commands.

- youtube/feed: rename row.videoId → video_id (snake_case convention),
  add to columns. youtube/video accepts both URL and id, so url-based
  round-trip already worked, but exposing the canonical id removes the
  url-parse step for chained calls.
- xiaohongshu/feed: pipeline map already extracts `id` from the homefeed
  payload, columns now lists it.
- xiaoe/catalog: pipeline map already projects `url`, columns now lists
  it. xiaoe/detail takes a positional url, so this completes the
  round-trip explicitly.

Also fixes one camelCase column violation on youtube/feed (videoId vs the
project's snake_case convention as in twitter `is_retweet`/`created_at`,
douban `subject_id`/`photo_id`, hupu `thread_title`).

CI gate `check:listing-id-pairing` ✓ (34 sites, 77 listings, 10 exempt).
typecheck clean. 114 tests pass for youtube + xiaohongshu.

* fix(youtube): keep feed continuation ids after rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant