Skip to content

Conversation

@eluce2
Copy link
Collaborator

@eluce2 eluce2 commented Dec 19, 2025

Note

Introduce includeAllFieldsByDefault (top-level and per-table) to control field inclusion for OData generation and expose it across the UI and generator.

  • Config/Types:
    • Add includeAllFieldsByDefault to fmodata top-level and per-table schemas in packages/typegen/src/types.ts.
  • Generator:
    • generateODataTypes and generateTableOccurrence honor includeAllFieldsByDefault (table override > top-level; default true) to filter generated fields based on explicit fields when false.
  • Web UI:
    • Default set in App.tsx for new OData configs.
    • In ConfigEditor, add switch for top-level includeAllFieldsByDefault.
    • In MetadataFieldsDialog:
      • Respect effective includeAllFieldsByDefault for per-field include/exclude logic, counts, and bulk actions; add per-table override select.
      • Adjust state updates to prune empty fields/table entries safely.
    • In MetadataTablesEditor, compute included field counts based on effective setting and display included/total when applicable.

Written by Cursor Bugbot for commit c8be2f8. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Dec 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
proofkit-docs Skipped Skipped Dec 20, 2025 2:02pm

@eluce2 eluce2 marked this pull request as ready for review December 19, 2025 22:26
Copy link
Collaborator Author

eluce2 commented Dec 19, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 19, 2025

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/better-auth@82

@proofkit/cli

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/cli@82

create-proofkit

pnpm add https://pkg.pr.new/proofgeist/proofkit/create-proofkit@82

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmdapi@82

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmodata@82

@proofkit/typegen

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/typegen@82

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/webviewer@82

commit: c8be2f8

@eluce2 eluce2 force-pushed the 12-19-include_all_fields_by_default branch from 6a2c2bf to edecb0a Compare December 20, 2025 13:16
@eluce2 eluce2 changed the base branch from fix_username/password_auth to graphite-base/82 December 20, 2025 13:50
@eluce2 eluce2 mentioned this pull request Dec 20, 2025
@eluce2 eluce2 changed the base branch from graphite-base/82 to fix_username/password_auth December 20, 2025 14:02
allTablesConfig,
setValue,
fieldsData,
topLevelIncludeAllFieldsByDefault,
Copy link

Choose a reason for hiding this comment

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

excludeAllFields not updated for new include-by-default setting

The includeAllFields function was updated to conditionally handle the effectiveIncludeAllFieldsByDefault setting with two branches of logic (one for true, one for false), but the excludeAllFields function was not similarly updated. When includeAllFieldsByDefault is false, fields not in the config array are already excluded by default, so the correct "exclude all" behavior would be to clear the fields array. Instead, excludeAllFields always adds every field with exclude: true, creating redundant config entries. Additionally, the dependency array is missing topLevelIncludeAllFieldsByDefault.

Fix in Cursor Fix in Web

const fieldConfig = Array.isArray(fieldsConfig)
? fieldsConfig.find((f) => f?.fieldName === fieldName)
: undefined;
const isExcluded = fieldConfig?.exclude === true;
Copy link

Choose a reason for hiding this comment

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

setFieldTypeOverride doesn't preserve field when clearing override

The setFieldTypeOverride function wasn't updated to account for includeAllFieldsByDefault. When removing a typeOverride and only fieldName remains, the code removes the entire field entry (lines 466-496). However, when includeAllFieldsByDefault is false, removing the field entry causes the field to become excluded, since fields not in the config array are excluded by default. This means clearing a type override unintentionally excludes the field. The function needs to preserve the field entry when includeAllFieldsByDefault is false, and its dependency array is also missing topLevelIncludeAllFieldsByDefault.

Fix in Cursor Fix in Web

@eluce2 eluce2 mentioned this pull request Dec 21, 2025
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.

2 participants