fix: resolve user emails in Knowledge UI and audit chart timescale#147
Merged
fix: resolve user emails in Knowledge UI and audit chart timescale#147
Conversation
Knowledge Insights/Changesets tabs showed raw UUIDs instead of email addresses. Wire useAuditFilters() user_labels map into all formatUser() calls across InsightsTab, InsightDrawer, ChangesetsTab, and ChangesetDrawer. Audit Overview Activity chart X-axis labels didn't adapt to the selected time range — pass the missing preset prop to TimeseriesChart. Bump mcp-datahub to v0.8.1 and align writer test mock with flat subjects array format.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
=======================================
Coverage 90.65% 90.65%
=======================================
Files 113 113
Lines 11032 11032
=======================================
Hits 10001 10001
Misses 743 743
Partials 288 288 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three bugs in the Admin portal:
Changes
Knowledge user email resolution (
KnowledgePage.tsx)The audit filters endpoint already returns
user_labels: Record<string, string>mapping user IDs to emails, andformatUser(id, email?)already handles display. The Knowledge page simply wasn't consuming this data.useAuditFilters()hook call in bothInsightsTabandChangesetsTabformatUser(id)calls toformatUser(id, userLabels[id]):InsightsTabtable row (captured_by)InsightDrawermetadata (captured_by), lifecycle (reviewed_by,applied_by)ChangesetsTabtable row (applied_by)ChangesetDrawermetadata (approved_by,applied_by), rollback (rolled_back_by)userLabelsas a prop from tab components into drawer componentsAudit chart timescale (
AuditLogPage.tsx)The
TimeseriesChartcomponent already accepts an optionalpresetprop that controls X-axis label formatting (HH:MM for 1h/6h, hour-only for 24h, Mon DD for 7d). TheOverviewTabhadpresetfromuseTimeRangeStore()but wasn't passing it through.preset={preset}to theTimeseriesChartinvocation (one-line fix)Dependency bump (
go.mod,go.sum, test)mcp-datahubv0.8.0 → v0.8.1 (fixes Query mutation schema for flatsubjectsarray)datahub_client_writer_test.gomock response with the new response formatTest plan
npm run buildinadmin-ui/— no TypeScript errorsmake verify— full CI suite passes (fmt, test, lint, security, coverage, mutation, release-check)