fix lists queries and authenticated list reading
CI / test (push) Successful in 10m5s
Publish npm package / publish (push) Successful in 9m53s

This commit is contained in:
2026-07-26 12:34:53 +09:00
parent b8400469ca
commit 45657a171e
20 changed files with 497 additions and 296 deletions
+23 -12
View File
@@ -29,9 +29,6 @@ describe('runtime-features', () => {
likes: {
likes_only: true,
},
lists: {
responsive_web_text_conversations_enabled: true,
},
},
});
@@ -44,9 +41,6 @@ describe('runtime-features', () => {
const likes = buildLikesFeatures();
expect(likes.global_flag).toBe(true);
expect(likes.likes_only).toBe(true);
const lists = buildListsFeatures();
expect(lists.responsive_web_text_conversations_enabled).toBe(true);
});
it('refresh merges defaults with existing cache', async () => {
@@ -119,11 +113,28 @@ describe('runtime-features', () => {
it('includes required lists API feature flags', () => {
const features = buildListsFeatures();
expect(features.responsive_web_graphql_exclude_directive_enabled).toBe(true);
expect(features.blue_business_profile_image_shape_enabled).toBe(true);
expect(features.responsive_web_text_conversations_enabled).toBe(false);
expect(features.tweetypie_unmention_optimization_enabled).toBe(true);
expect(features.vibe_api_enabled).toBe(true);
expect(features.interactive_text_enabled).toBe(true);
expect(features.responsive_web_graphql_exclude_directive_enabled).toBeUndefined();
expect(features.responsive_web_grok_annotations_enabled).toBe(true);
expect(features.rweb_cashtags_enabled).toBe(true);
expect(features.responsive_web_grok_show_grok_translated_post).toBe(true);
expect(features.longform_notetweets_inline_media_enabled).toBe(false);
});
it('keeps catalog-locked list features independent from runtime overrides', () => {
process.env.BIRD_FEATURES_JSON = JSON.stringify({
global: {
responsive_web_grok_annotations_enabled: false,
},
sets: {
lists: {
rweb_cashtags_enabled: false,
},
},
});
clearFeatureOverridesCache();
const features = buildListsFeatures();
expect(features.responsive_web_grok_annotations_enabled).toBe(true);
expect(features.rweb_cashtags_enabled).toBe(true);
});
});