feat: show common PostgreSQL type aliases in the UI - #1553
Conversation
Native pg_catalog type names like int8 confuse users who know these types by their SQL spellings. Display them via their common aliases (int8 -> bigint, int4 -> integer, int2 -> smallint, float8 -> double precision, float4 -> real, bool -> boolean, bpchar -> char) in the grid header, filter column picker, and schema visualizer, preserving the [] suffix for array types. Familiar short names (timestamptz, varchar, ...) stay as-is, user-defined types and other dialects are untouched, and the mapping is display-only. Closes #1416 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
Summary by CodeRabbit
WalkthroughStudio now displays common PostgreSQL SQL aliases instead of native catalog names in table headers, filter column labels, and schema visualization fields. A shared formatter handles recognized 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
Compute preview deployed. Branch: |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai full review |
✅ Action performedFull review finished. You're currently rate limited under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. Your next review will be available in 34 minutes. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Fixes #1416
PostgreSQL catalogs columns under internal names (
int8,int4,bpchar, …) that confuse users who declaredbigint,integer,char. Studio now displays the common alias in the display layer only:int8→bigint,int4→integer,int2→smallint,float8→double precision,float4→real,bool→boolean,bpchar→char; arrays keep the[]suffix around the aliased element (int8[]→bigint[]).datatype.schema === "pg_catalog", so user-defined types (even one literally namedint8in another schema) and MySQL/SQLite types pass through unchanged.timestamptz/timetzdeliberately stay as-is — short, widely used, and the full names are too long for header cells.int8columns), and the schema visualizer. Type metadata used for filtering, editing, and SQL generation is untouched.Verification
22 table-driven helper tests + a rendered-header assertion; existing suites for the touched components pass (typecheck/lint clean). FEATURES.md documented; changeset included (patch).
🤖 Generated with Claude Code