Skip to content

🧹 Remove unused MDX frontmatter fields: createdByEmail and lastUpdatedByEmail - Closes #2654#2655

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
remove-unused-email-frontmatter-fields-44a97807ac20edab
Draft

🧹 Remove unused MDX frontmatter fields: createdByEmail and lastUpdatedByEmail - Closes #2654#2655
github-actions[bot] wants to merge 1 commit into
mainfrom
remove-unused-email-frontmatter-fields-44a97807ac20edab

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the unused createdByEmail and lastUpdatedByEmail frontmatter fields from the app repo as requested in #2654. These fields were write-only — they were stored in MDX frontmatter but never read by the UI or business logic.

Changes

TinaCMS Schema

  • tina/collection/shared/createdInfoFields.ts: Removed the createdByEmail field definition
  • tina/collection/shared/historyFields.ts: Removed the lastUpdatedByEmail field definition; removed userEmail variable and all writes to lastUpdatedByEmail in historyBeforeSubmit

Rule Collection

  • tina/collection/rule.tsx: Removed createdByEmail: "Unknown" from defaultItem

UserInfoField Component

  • tina/fields/UserInfoField.tsx: Simplified the branch that resolved createdByEmail → email vs createdBy → fullName; now always resolves to fullName since createdByEmail no longer exists

GraphQL Queries

  • tina/queries/queries.gql: Removed createdByEmail and lastUpdatedByEmail from both ruleData and ruleDataBasic queries

Category Update API

  • app/api/update-category/types.ts: Removed createdByEmail and lastUpdatedByEmail from CategoryFullQueryResponse and CategoryMutationParams
  • app/api/update-category/constants.ts: Removed fields from CATEGORY_FULL_QUERY and CATEGORY_FULL_QUERY_NO_INDEX GraphQL queries
  • app/api/update-category/update-the-category-rule-list.ts: Removed createdByEmail and lastUpdatedByEmail from buildCategoryParams

Generated Files

  • tina/tina-lock.json: Updated to remove field entries for both createdByEmail and lastUpdatedByEmail

Acceptance Criteria Coverage

  • createdByEmail and lastUpdatedByEmail removed from TinaCMS schema/config
  • TinaCMS no longer writes these fields into MDX frontmatter
  • App GraphQL queries no longer request these fields
  • App TypeScript types and mutation params no longer include these fields
  • Category update flows no longer preserve/pass through these fields
  • Tina generated files (tina-lock.json) updated
  • Content repo cleanup for SSW.Rules.Content — tracked as follow-up per the issue

Notes

The content repo cleanup (removing existing frontmatter values from MDX files in SSW.Rules.Content) should be done as a follow-up after this PR is merged, as the app no longer depends on these fields.

Closes #2654

Generated by Issue Triage for issue #2654 · ● 2.9M ·

- Remove createdByEmail field from TinaCMS schema (createdInfoFields.ts)
- Remove lastUpdatedByEmail field from TinaCMS schema (historyFields.ts)
- Stop writing lastUpdatedByEmail in historyBeforeSubmit
- Remove createdByEmail default value from rule.tsx defaultItem
- Remove createdByEmail and lastUpdatedByEmail from GraphQL queries (queries.gql)
- Remove fields from category API types (CategoryFullQueryResponse, CategoryMutationParams)
- Remove fields from category GraphQL queries in constants.ts
- Remove fields from buildCategoryParams in update-the-category-rule-list.ts
- Simplify UserInfoField to always use fullName (email branch now dead code)
- Update tina-lock.json to reflect schema changes

Closes #2654

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧹 Remove unused MDX frontmatter fields: createdByEmail and lastUpdatedByEmail

0 participants