Skip to content

core: add extra metadata field to Thread struct - #29675

Merged
kumquatexpress merged 1 commit into
mainfrom
bobo/thread-extras
Jun 23, 2026
Merged

core: add extra metadata field to Thread struct#29675
kumquatexpress merged 1 commit into
mainfrom
bobo/thread-extras

Conversation

@kumquatexpress

Copy link
Copy Markdown
Contributor

Summary

Adds a field Thread.extras that can be used to hold arbitrary metadata specific to a given thread.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ff937b820

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(rename_all = "camelCase", export_to = "v2/")]
pub struct ThreadExtra {}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Model thread extra as a metadata map

If extra is meant to carry implementation-specific thread metadata, this empty struct loses that data: deserializing an object such as {"foo":"bar"} into ThreadExtra ignores the key, and serializing Some(ThreadExtra {}) can only emit {}. This makes any non-null metadata disappear on Rust round trips and the generated TypeScript type is Record<string, never> rather than an extensible metadata object; use an explicit metadata map/value or concrete fields instead.

Useful? React with 👍 / 👎.

@kumquatexpress
kumquatexpress force-pushed the bobo/thread-extras branch 2 times, most recently from 909c511 to 5be7aff Compare June 23, 2026 18:34
@kumquatexpress
kumquatexpress enabled auto-merge (squash) June 23, 2026 18:57
@kumquatexpress
kumquatexpress merged commit 3548079 into main Jun 23, 2026
31 checks passed
@kumquatexpress
kumquatexpress deleted the bobo/thread-extras branch June 23, 2026 19:16
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants