Skip to content

Conversation

@eluce2
Copy link
Collaborator

@eluce2 eluce2 commented Dec 19, 2025

Note

Introduces configurable field-inclusion behavior for OData generation.

  • Config/types: Adds includeAllFieldsByDefault to FmodataConfig and table configs in types.ts (default true)
  • Generator: generateODataTypes.ts propagates and respects includeAllFieldsByDefault; when false, only fields explicitly listed in tableOverride.fields are generated
  • UI (App/ConfigEditor): Defaults includeAllFieldsByDefault to true and exposes a switch to toggle it
  • UI (MetadataFieldsDialog): Adds per-table override selector, updates include/exclude logic and "Include All" behavior to honor the effective setting
  • UI (MetadataTablesEditor): Field count now reflects effective inclusion (all minus explicit excludes vs only explicitly included)

Written by Cursor Bugbot for commit e04e52a. 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.

Project Deployment Review Updated (UTC)
proofkit-docs Ready Ready Preview Jan 5, 2026 5:17pm

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

eluce2 commented Dec 19, 2025

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
@eluce2 eluce2 mentioned this pull request Jan 5, 2026
Copy link
Collaborator Author

eluce2 commented Jan 5, 2026

Merge activity

  • Jan 5, 5:09 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jan 5, 5:15 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jan 5, 5:16 PM UTC: @eluce2 merged this pull request with Graphite.

@eluce2 eluce2 changed the base branch from fix_username/password_auth to graphite-base/82 January 5, 2026 17:12
@eluce2 eluce2 changed the base branch from graphite-base/82 to main January 5, 2026 17:14
@eluce2 eluce2 force-pushed the 12-19-include_all_fields_by_default branch from c8be2f8 to e04e52a Compare January 5, 2026 17:15
@eluce2 eluce2 merged commit 11f807a into main Jan 5, 2026
5 of 6 checks passed
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.

1 participant