-
[OPIK-4173] [FE] Smart default to Threads tab when project has threads (#5148)
发布于
2026-02-17 14:34:24 +00:00 - [OPIK-4173] [FE] Smart default to Threads tab when project has threads
- useProjectTabs accepts optional defaultLogsType to override the default
- TracesPage fetches thread stats via useThreadsStatistic with date range
and sets defaultLogsType to threads when threadCount > 0 - All navigation links now pass explicit tab + logsType params to prevent
smart default from overriding intended navigation targets - Migrated AnnotationQueuePage from legacy type param to new format
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 2: Migrate remaining legacy type params to new tab+logsType format
- TraceTreeViewer: type: "spans" → tab + logsType
- AddEditRuleDialog: type based on scope → tab + logsType
- NoQueueItemsPage: type based on queue type → tab + logsType
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 3: Migrate generateTracesURL from legacy type to tab+logsType
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 4: Add default search to RESOURCE_MAP and fix BE trace redirect URL
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 5: Move PROJECT_TAB enum to shared constants to fix import boundary lint errors
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 6: Persist logsType per project in localStorage and prevent first-visit flicker
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4173] [FE] Consolidate logsType resolution into useProjectTabs
Move all logs-type logic (threadCount-based default, localStorage
override, query param resolution) into a single useMemo in
useProjectTabs. Rename localStorage key to project-logsType-{id}
for prefix-based grouping.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4173] [FE] Simplify resolvedDefaultLogsType ternary
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4173] [FE] Move thread stats fetching into useProjectTabs hook
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Co-authored-by: Claude Opus 4.6 noreply@anthropic.com
下载附件