Repository navigation
fix(app): use plural source kind labels and OTel spelling - #3257
Conversation
The source form's data type options and the sources list now share one label map: Logs, Traces, OTel Metrics, Sessions, PromQL.
🦋 Changeset detectedLatest commit: 2a6a066 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
|
|
||
| export const DEFAULT_DATABASE = 'default'; | ||
|
|
||
| export const SOURCE_KIND_LABELS: Record<SourceKind, string> = { |
There was a problem hiding this comment.
🔵 minor — SOURCE_KIND_LABELS lives in the source form's private constants, away from the existing kind→icon map
Move SOURCE_KIND_LABELS next to SOURCE_KIND_ICONS in packages/app/src/components/sourceSelectUtils.tsx, which is already the shared per-SourceKind display map. SourcesList would then import it from there instead of reaching into ./SourceForm/constants, and both kind maps (and any future kind) get updated in one place.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review✅ No issues found. |
|
Deep Review✅ No critical issues found. This is a tightly-scoped UI copy change: a shared 🔵 P3 nitpicks (2)
Reviewers (6): correctness, testing, maintainability, project-standards, kieran-typescript, previous-comments. Testing gaps: Form radio labels are covered only indirectly (shared map + flag-gated E2E); the five list labels are directly unit-tested. No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 391 passed • 1 skipped • 1212s
Tests ran across 4 shards in parallel. |
Summary
Source kinds now show as Logs, Traces, OTel metrics, Sessions, and PromQL in both the "Source Data Type" radio group and the sources list under Team settings. The list used to print the raw kind with its first letter capitalized, so it showed "Metric" and "Promql" while the form said "OTEL Metrics".
One map,
SOURCE_KIND_LABELS, feeds both. The schema warnings on the metric table form now say "OTel" as well, andcapitalizeFirstLetteris deleted because the list was its last caller.A new unit test checks the list labels. The E2E specs that click these radios by exact text are updated and pass locally.
Screenshots or video
How to test on Vercel preview
Preview routes: /search
Steps:
/search.data-testid="source-actions-menu") next to the source picker.Team settings needs the API, which the local-mode preview doesn't run, so only the form is testable there.
References
🤖 Generated with Claude Code