Skip to content

fix: fields null#8941

Merged
csiyang merged 4 commits intomainfrom
siyangcao/nes-1444-error-customizing-fill-in-words-in-ad-templates
Apr 1, 2026
Merged

fix: fields null#8941
csiyang merged 4 commits intomainfrom
siyangcao/nes-1444-error-customizing-fill-in-words-in-ad-templates

Conversation

@csiyang
Copy link
Copy Markdown
Contributor

@csiyang csiyang commented Apr 1, 2026

The regex in renderEditableText required at least one character after the
colon ([^}]+), so tokens like {{key: }} generated by
formatTemplateCustomizationString never matched and rendered as plain text.
Updated the regex to make the colon+value group optional and allow empty
values ([^}]*). Also adds error handling with snackbar feedback when the
mutation fails.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Summary by CodeRabbit

  • New Features
    • Extended Journey entity with customization description and customization fields data
    • Introduced new JourneyCustomizationField type with attributes: id, journey id, key, value, and default value
    • New GraphQL API capabilities now available for querying journey customization information

@csiyang csiyang self-assigned this Apr 1, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Apr 1, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e3a6226c-f1c1-41d7-b2f1-dfa49f726a36

📥 Commits

Reviewing files that changed from the base of the PR and between c1af9be and b625486.

📒 Files selected for processing (6)
  • apis/api-gateway/schema.graphql
  • apis/api-journeys-modern/schema.graphql
  • apis/api-journeys-modern/src/schema/journey/journey.ts
  • apis/api-journeys-modern/src/schema/journeyCustomizationField/index.ts
  • apis/api-journeys-modern/src/schema/journeyCustomizationField/journeyCustomizationField.ts
  • apis/api-journeys-modern/src/schema/schema.ts

Walkthrough

This PR extends the GraphQL schema to share the JourneyCustomizationField type across two federated subgraphs (API_JOURNEYS and API_JOURNEYS_MODERN). The Journey type gains two new fields referencing this shared type, with corresponding TypeScript object definitions and schema registrations.

Changes

Cohort / File(s) Summary
API Gateway Federation Updates
apis/api-gateway/schema.graphql
Removed @join__field(graph: API_JOURNEYS) directives from Journey's journeyCustomizationDescription and journeyCustomizationFields fields, and added @join__type(graph: API_JOURNEYS_MODERN) directive to JourneyCustomizationField to enable cross-subgraph type sharing.
API Journeys Modern Schema Definition
apis/api-journeys-modern/schema.graphql
Added new JourneyCustomizationField type marked as @shareable with fields id, journeyId, key, value, and defaultValue; extended Journey type with journeyCustomizationDescription and journeyCustomizationFields fields.
API Journeys Modern Type Resolvers
apis/api-journeys-modern/src/schema/journey/journey.ts, apis/api-journeys-modern/src/schema/journeyCustomizationField/journeyCustomizationField.ts
Implemented JourneyRef field extensions and new JourneyCustomizationFieldRef Prisma object definition with appropriate field types and federation sharing directives.
API Journeys Modern Schema Registration
apis/api-journeys-modern/src/schema/journeyCustomizationField/index.ts, apis/api-journeys-modern/src/schema/schema.ts
Added barrel module export for JourneyCustomizationFieldRef and imported the new journeyCustomizationField schema module in the main schema bootstrap file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: fields null' is vague and does not clearly summarize the actual changes made in the PR, which involve adding new GraphQL fields and adjusting federation metadata. Use a more descriptive title that captures the main change, such as 'fix: expose journey customization fields in API gateway' or 'feat: add journeyCustomizationField type and fields'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch siyangcao/nes-1444-error-customizing-fill-in-words-in-ad-templates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 1, 2026

View your CI Pipeline Execution ↗ for commit b625486

Command Status Duration Result
nx run-many --target=vercel-alias --projects=jo... ✅ Succeeded 2s View ↗
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 9s View ↗
nx run-many --target=deploy --projects=journeys... ✅ Succeeded 59s View ↗
nx run-many --target=vercel-alias --projects=re... ✅ Succeeded 2s View ↗
nx run-many --target=vercel-alias --projects=watch ✅ Succeeded 2s View ↗
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 5s View ↗
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 4s View ↗
nx run-many --target=vercel-alias --projects=vi... ✅ Succeeded 2s View ↗
Additional runs (13) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-04-01 01:32:57 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 1, 2026

View your CI Pipeline Execution ↗ for commit b625486


☁️ Nx Cloud last updated this comment at 2026-04-01 01:31:08 UTC

@github-actions github-actions Bot temporarily deployed to Preview - short-links April 1, 2026 00:36 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch April 1, 2026 00:36 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player April 1, 2026 00:36 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin April 1, 2026 00:36 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources April 1, 2026 00:36 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys April 1, 2026 00:36 Inactive
@github-actions github-actions Bot requested a deployment to Preview - journeys-admin April 1, 2026 00:36 Pending
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
short-links ✅ Ready short-links preview Wed Apr 1 14:31:39 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
videos-admin ✅ Ready videos-admin preview Wed Apr 1 14:31:53 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys ✅ Ready journeys preview Wed Apr 1 14:31:52 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch ✅ Ready watch preview Wed Apr 1 14:32:03 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
player ✅ Ready player preview Wed Apr 1 14:31:53 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
resources ✅ Ready resources preview Wed Apr 1 14:32:06 NZDT 2026

@github-actions github-actions Bot temporarily deployed to Preview - videos-admin April 1, 2026 00:40 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys April 1, 2026 00:40 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin April 1, 2026 00:40 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch April 1, 2026 00:40 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch-modern April 1, 2026 00:40 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player April 1, 2026 00:40 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links April 1, 2026 00:40 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources April 1, 2026 00:40 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch-modern ✅ Ready watch-modern preview Wed Apr 1 13:42:54 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys-admin ✅ Ready journeys-admin preview Wed Apr 1 14:32:24 NZDT 2026

@github-actions github-actions Bot requested a deployment to Preview - journeys-admin April 1, 2026 01:23 Pending
csiyang and others added 3 commits April 1, 2026 01:26
The regex in renderEditableText required at least one character after the
colon (`[^}]+`), so tokens like `{{key: }}` generated by
formatTemplateCustomizationString never matched and rendered as plain text.
Updated the regex to make the colon+value group optional and allow empty
values (`[^}]*`). Also adds error handling with snackbar feedback when the
mutation fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot requested a deployment to Preview - videos-admin April 1, 2026 01:27 Pending
@github-actions github-actions Bot requested a deployment to Preview - resources April 1, 2026 01:27 Pending
@github-actions github-actions Bot requested a deployment to Preview - journeys April 1, 2026 01:27 Pending
@github-actions github-actions Bot requested a deployment to Preview - short-links April 1, 2026 01:27 Pending
@github-actions github-actions Bot requested a deployment to Preview - journeys-admin April 1, 2026 01:27 Pending
…ption fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@csiyang csiyang force-pushed the siyangcao/nes-1444-error-customizing-fill-in-words-in-ad-templates branch from 2472434 to b625486 Compare April 1, 2026 01:28
@github-actions github-actions Bot temporarily deployed to Preview - watch April 1, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links April 1, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources April 1, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player April 1, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin April 1, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin April 1, 2026 01:30 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys April 1, 2026 01:30 Inactive
@csiyang csiyang requested a review from mikeallisonJS April 1, 2026 01:41
@csiyang csiyang marked this pull request as ready for review April 1, 2026 01:41
@stage-branch-merger
Copy link
Copy Markdown
Contributor

I see you added the "on stage" label, I'll get this merged to the stage branch!

@stage-branch-merger
Copy link
Copy Markdown
Contributor

Merge conflict attempting to merge this into stage. Please fix manually.

@csiyang csiyang added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit 6243430 Apr 1, 2026
35 of 36 checks passed
@csiyang csiyang deleted the siyangcao/nes-1444-error-customizing-fill-in-words-in-ad-templates branch April 1, 2026 02:00
tanflem pushed a commit that referenced this pull request Apr 3, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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