Conversation
📝 WalkthroughWalkthroughAdds support for column pinning direction in the table views schema by introducing a new optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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. Comment |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/validation-schemas/table-views-schema.ts (1)
59-59: LGTM — optional: consider whethernullshould be a validpinnedvalueThe addition is correct and consistent with the rest of the schema. One thing to think about: if the consumers of this schema use a table library (e.g., AG Grid) where explicitly un-pinning a column is represented as
pinned: nullorpinned: false, the current definition will reject that payload and require callers to omit the property entirely instead.If explicit "unpin" round-trips are needed, you could widen the definition:
💡 Optional: allow explicit unpin via
null- pinned: { type: 'string', enum: ['left', 'right'] }, + pinned: { enum: ['left', 'right', null] },If omission is the agreed contract for "unpinned," no change is needed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/validation-schemas/table-views-schema.ts` at line 59, The current schema for the pinned property (pinned: { type: 'string', enum: ['left', 'right'] }) rejects explicit unpin values like null; update the pinned definition to accept null as a valid explicit "unpinned" value (e.g., allow type to include 'null' or add null to the enum) so consumers can round-trip explicit unpinning without removing the property; locate and modify the pinned schema entry in src/validation-schemas/table-views-schema.ts (symbol: pinned) and ensure the change matches the project's JSON/schema style (type array vs. nullable/enum) used elsewhere.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/validation-schemas/table-views-schema.ts`:
- Line 59: The current schema for the pinned property (pinned: { type: 'string',
enum: ['left', 'right'] }) rejects explicit unpin values like null; update the
pinned definition to accept null as a valid explicit "unpinned" value (e.g.,
allow type to include 'null' or add null to the enum) so consumers can
round-trip explicit unpinning without removing the property; locate and modify
the pinned schema entry in src/validation-schemas/table-views-schema.ts (symbol:
pinned) and ensure the change matches the project's JSON/schema style (type
array vs. nullable/enum) used elsewhere.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/validation-schemas/__tests__/table-views-schema.spec.tssrc/validation-schemas/table-views-schema.ts



Summary by cubic
Adds support for pinning table columns to the left or right in table views. Updates the schema and tests to validate allowed values and combinations.
Written for commit eb33b0c. Summary will update on new commits.