Skip to content

Conversation

@rebelice
Copy link
Collaborator

@rebelice rebelice commented Feb 6, 2026

CleanShot 2026-02-06 at 17 59 06@2x

Summary

  • Format PostgreSQL UUID columns as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx instead of raw byte arrays
  • Handle [16]byte type returned by pgx driver in both query executor and metadata data layer

Closes #4

Test plan

  • Create a table with UUID columns and verify values display correctly
  • Verify existing data types (text, integer, JSONB, etc.) are unaffected

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of PostgreSQL UUID values so they are consistently recognized and formatted as standard UUID strings in query results.
  • Tests

    • Minor test adjustments to suppress returned errors in pin-related table view tests (no behavior change for end users).

Format PostgreSQL UUID columns as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
instead of raw byte arrays.

Closes #4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

Adds handling for PostgreSQL UUIDs by recognizing [16]byte values in two convertValueToString implementations and formatting them as standard UUID strings. Also updates two tests to ignore errors returned by TogglePin().

Changes

Cohort / File(s) Summary
UUID Type Handling
internal/db/metadata/data.go, internal/db/query/executor.go
Added a new type case for [16]byte in convertValueToString to format 16-byte PostgreSQL UUIDs as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx before other []byte handling.
Test adjustments
internal/ui/components/table_view_pin_test.go
Replaced direct error returns from TogglePin() with blank identifier assignments (_ = tv.TogglePin()) in two tests, discarding returned errors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I found sixteen bytes beneath a log,
I stitched them with hyphens through the fog.
Now UUIDs hop out, neat and bright,
Telling their tale in readable light. 🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding UUID formatting support to display values in standard dashed format instead of raw byte arrays.
Linked Issues check ✅ Passed The PR directly addresses issue #4 by implementing UUID display formatting in both query executor and metadata layers, handling [16]byte types and converting them to standard UUID string format.
Out of Scope Changes check ✅ Passed Changes to test files (suppressing error returns) appear incidental to the main UUID formatting objective; all core changes focus on UUID value conversion as specified in issue #4.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/uuid-display

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@internal/ui/components/table_view_pin_test.go`:
- Line 131: The test currently discards the error from tv.TogglePin(); update
the test to assert the call succeeds like the other cases in this file by
checking the returned error from TogglePin() (e.g., use the same error assertion
pattern used at lines where TogglePin is already checked) instead of assigning
to blank identifier; apply the same change for the other occurrences noted (the
tv.TogglePin() calls at the later two spots) so all TogglePin() invocations in
this test verify and fail on error consistently.

@rebelice rebelice merged commit d2227f0 into main Feb 6, 2026
7 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.

Support for showing UUID

1 participant