Skip to content

fix: use empty strings for the IDs in the search.all and search.files samples - #1720

Closed
zimeg wants to merge 1 commit into
mainfrom
zimeg-fix-search-sample-placeholders
Closed

zimeg wants to merge 1 commit into
mainfrom
zimeg-fix-search-sample-placeholders

Conversation

@zimeg

@zimeg zimeg commented Nov 20, 2026

Copy link
Copy Markdown
Member

This pull request changes 50 placeholder IDs in the search.all and search.files response samples back to empty strings, so each ID field in these samples holds one kind of value again.

Since #1636, fields like ts, team_id, user and share_user_id in these two samples mix empty strings with placeholder IDs (U00000000, T00000000, 0000000000.000000). slackapi/node-slack-sdk generates its response types from these samples with quicktype, which reads a field with two values repeated many times as an enum. That turned ts?: string into '' | '0000000000.000000' and narrowed team, team_id, user, user_team and share_user_id the same way in slackapi/node-slack-sdk#2878. With every value empty, quicktype keeps these fields as string, and user goes back to string in search.all too.

Changing the empty strings to placeholders instead doesn't work: quicktype then types the field as the single placeholder, such as user?: 'U00000000'. Only these values change, and no property is added or removed.

test_locally.api.methods.SearchTest passes with the updated samples.

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

🤖 Generated with Claude Code

@zimeg
zimeg requested a review from a team as a code owner November 20, 2026 03:27
@zimeg zimeg added this to the 1.55.1 milestone Nov 20, 2026
@zimeg zimeg added project:slack-api-client project:slack-api-client semver:patch labels Nov 20, 2026
@zimeg zimeg self-assigned this Nov 20, 2026
@zimeg
zimeg marked this pull request as draft November 20, 2026 03:30
@zimeg
zimeg marked this pull request as ready for review November 20, 2026 03:31
@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.97%. Comparing base (aa275be) to head (fb15fe1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1720      +/-   ##
============================================
+ Coverage     73.95%   73.97%   +0.02%     
  Complexity     4823     4823              
============================================
  Files           490      490              
  Lines         15033    15033              
  Branches       1584     1584              
============================================
+ Hits          11117    11121       +4     
+ Misses         2982     2978       -4     
  Partials        934      934              
Flag Coverage Δ
jdk-14 73.97% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@mwbrooks mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks @zimeg! Fixing the samples here is the right spot to get those string types back in slackapi/node-slack-sdk#2878.

"share_user_id": "",
"source": "",
"is_silent_share": false
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note (non-blocking): Just below this, channels still holds both "" and "C00000000". That mix was on main before #1636, so it is fine to leave here, but it may be worth checking its generated type in the node SDK.

@zimeg

zimeg commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

📦 Closing in favor of a generator-side fix in slackapi/node-slack-sdk#2878: scripts/code_generator.rb now blanks the recorder's placeholder IDs before quicktype reads a sample, so these samples stay as recorded and future syncs can't narrow the node types again.

@zimeg zimeg closed this Nov 20, 2026
@zimeg
zimeg deleted the zimeg-fix-search-sample-placeholders branch November 20, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants