Skip to content

Conversation

@MildTomato
Copy link
Member

This PR enables dynamic column generation for the Unified Logs table, improving maintainability and flexibility. Key changes:

Dynamic Columns
• Added generateDynamicColumns in Columns.tsx to build columns based on data.
• Columns like method, pathname, and event_message are hidden if empty.
• Replaced static UNIFIED_LOGS_COLUMNS with dynamic version using useMemo in UnifiedLogs.tsx.

Simplified Definitions
• Removed unused metadata and class names from columns.
• Standardized column sizing and sorting behavior.

Fallback
• Added static fallback using generateDynamicColumns([]) when no data exists.

Eliminated the 'host' field from filter fields, schema definitions, and column configuration in UnifiedLogs. This streamlines the logs interface and removes unused or unnecessary data.
Replaces static column definitions with a dynamic generator that hides columns when all their values are empty. The UnifiedLogs table now adapts its columns based on the current data, improving readability and relevance.
@MildTomato MildTomato requested a review from a team as a code owner July 17, 2025 09:53
@vercel
Copy link

vercel bot commented Jul 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 1:01pm
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 1:01pm
studio-self-hosted ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 1:01pm
studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 1:01pm
ui-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 1:01pm
zone-www-dot-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 1:01pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cms ⬜️ Ignored (Inspect) Jul 17, 2025 1:01pm
studio ⬜️ Ignored (Inspect) Visit Preview Jul 17, 2025 1:01pm

@supabase
Copy link

supabase bot commented Jul 17, 2025

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coveralls
Copy link

coveralls commented Jul 17, 2025

Coverage Status

coverage: 76.259%. remained the same
when pulling 1a8ad16 on feat/dynamic-columns-logs
into fb6f625 on master.

Added explicit cell and header class names for column widths in the UnifiedLogs table to ensure consistent sizing and improve layout control.
Copy link
Member

@alaister alaister left a comment

Choose a reason for hiding this comment

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

LGTM!

  • Tested on preview

Copy link
Member

@alaister alaister left a comment

Choose a reason for hiding this comment

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

blocking

The dynamic columns generator now returns both columns and their visibility state, allowing UnifiedLogs to merge dynamic visibility with existing column visibility. This improves control over which columns are shown based on the data.
Copy link
Member

@alaister alaister left a comment

Choose a reason for hiding this comment

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

LGTM once again!

@MildTomato MildTomato merged commit eb01061 into master Jul 17, 2025
19 checks passed
@MildTomato MildTomato deleted the feat/dynamic-columns-logs branch July 17, 2025 13:02
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.

3 participants