Skip to content

refactor(import): use .parse() at boundaries instead of manual .make()#17106

Open
kitlangton wants to merge 1 commit intodevfrom
feat/parse-at-import-boundary
Open

refactor(import): use .parse() at boundaries instead of manual .make()#17106
kitlangton wants to merge 1 commit intodevfrom
feat/parse-at-import-boundary

Conversation

@kitlangton
Copy link
Contributor

Summary

  • Replace manual SessionID.make() / MessageID.make() / PartID.make() / WorkspaceID.make() wrapping in the import command with .parse() calls on the branded Zod schemas
  • Session.Info.parse(), MessageV2.Info.parse(), and MessageV2.Part.parse() validate and brand in one step at the import boundary
  • Removes 8 lines of manual ID wrapping, drops unused schema imports

Test plan

  • Typecheck passes (verified locally)
  • Import a session from file and verify it imports correctly
  • Import a session from share URL and verify it imports correctly

@kitlangton kitlangton force-pushed the feat/branded-remaining-ids branch from 6d948bf to 753f330 Compare March 11, 2026 23:31
@kitlangton kitlangton force-pushed the feat/parse-at-import-boundary branch 5 times, most recently from 4c81469 to 46c8d70 Compare March 12, 2026 00:57
@kitlangton kitlangton force-pushed the feat/branded-remaining-ids branch from 19452df to 562689c Compare March 12, 2026 00:59
@kitlangton kitlangton force-pushed the feat/parse-at-import-boundary branch from 46c8d70 to d2fc03a Compare March 12, 2026 00:59
Base automatically changed from feat/branded-remaining-ids to dev March 12, 2026 01:49
…) calls

Parse external SDK data through branded Zod schemas (Session.Info,
MessageV2.Info, MessageV2.Part) at the import boundary. This replaces
manual SessionID.make/MessageID.make/PartID.make wrapping with a single
.parse() call per entity, which both validates and brands in one step.
@kitlangton kitlangton force-pushed the feat/parse-at-import-boundary branch from d2fc03a to 3896f1a Compare March 12, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant