feat(dashboard/logs): add fullscreen mode#632
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthrough在仪表板日志视图中添加全屏模式与提供商列可见性控制:新增本地化键、引入客户端全屏Hook、扩展虚拟化日志表组件的可配置props、在使用视图中实现全屏叠加层与概览数据抓取,并补充相关单元/集成测试与若干导入整理。 Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello @ding113, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the user experience of the dashboard's usage logs by implementing a new fullscreen mode. This mode provides an immersive environment for reviewing log data, complete with real-time metrics and the ability to dynamically adjust column visibility. The feature is built upon a new, reusable React hook for managing fullscreen state and includes comprehensive internationalization support. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🧪 测试结果
总体结果: ✅ 所有测试通过 |
There was a problem hiding this comment.
Code Review
This pull request introduces a fullscreen mode for the dashboard's usage logs, which is a great enhancement for monitoring. The implementation includes a new reusable useFullscreen hook, updates to the virtualized table to support new display options, and new UI elements for entering and controlling the fullscreen view. The code is well-structured, and the new feature is covered by tests. I have one suggestion to refactor some duplicated state management logic to improve maintainability.
| const handleExitFullscreen = useCallback(async () => { | ||
| setIsFullscreenOpen(false); | ||
| setHideProviderColumn(false); | ||
| wasInFullscreenRef.current = false; | ||
| await fullscreen.exit(); | ||
| }, [fullscreen]); | ||
|
|
||
| useEffect(() => { | ||
| if (!isFullscreenOpen) return; | ||
|
|
||
| if (fullscreen.isFullscreen) { | ||
| wasInFullscreenRef.current = true; | ||
| return; | ||
| } | ||
|
|
||
| if (wasInFullscreenRef.current) { | ||
| setIsFullscreenOpen(false); | ||
| setHideProviderColumn(false); | ||
| wasInFullscreenRef.current = false; | ||
| } | ||
| }, [fullscreen.isFullscreen, isFullscreenOpen]); |
There was a problem hiding this comment.
The logic for resetting the fullscreen state is duplicated in handleExitFullscreen and the useEffect that handles native fullscreen exit. To improve maintainability and avoid redundancy, you could extract this state reset logic into a separate useCallback function.
const resetFullscreenState = useCallback(() => {
setIsFullscreenOpen(false);
setHideProviderColumn(false);
wasInFullscreenRef.current = false;
}, []);
const handleExitFullscreen = useCallback(async () => {
resetFullscreenState();
await fullscreen.exit();
}, [fullscreen, resetFullscreenState]);
useEffect(() => {
if (!isFullscreenOpen) return;
if (fullscreen.isFullscreen) {
wasInFullscreenRef.current = true;
return;
}
if (wasInFullscreenRef.current) {
resetFullscreenState();
}
}, [fullscreen.isFullscreen, isFullscreenOpen, resetFullscreenState]);
There was a problem hiding this comment.
Code Review Summary
This PR adds fullscreen mode support for the dashboard usage logs page. The implementation is well-structured overall, but I've identified one issue that should be addressed.
PR Size: L
- Lines changed: 886 (682 additions + 204 deletions)
- Files changed: 13
Issues Found
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Logic/Bugs | 0 | 0 | 0 | 0 |
| Security | 0 | 0 | 0 | 0 |
| Error Handling | 0 | 1 | 0 | 0 |
| Types | 0 | 0 | 0 | 0 |
| Comments/Docs | 0 | 0 | 0 | 0 |
| Tests | 0 | 0 | 0 | 0 |
| Simplification | 0 | 0 | 0 | 0 |
High Priority Issues (Should Fix)
[ERROR-SILENT] Silent error suppression in fullscreen request handler
File: src/app/[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsx
Location: Lines 195-201 (in diff context)
The catch block suppresses errors from fullscreen.request() without logging or providing user feedback:
try {
await fullscreen.request(document.documentElement);
} catch {
return;
}Why this is a problem: If fullscreen fails (permissions denied, browser restrictions, iframes, etc.), the user receives no indication that their action didn't work. The UI will appear unresponsive.
Suggested fix:
try {
await fullscreen.request(document.documentElement);
} catch (error) {
console.error("Failed to enter fullscreen:", error);
// Optionally show a toast notification to the user
return;
}Review Coverage
- Logic and correctness - Clean
- Security (OWASP Top 10) - Clean
- Error handling - 1 issue found
- Type safety - Clean
- Documentation accuracy - Clean
- Test coverage - Adequate
- Code clarity - Good
Notes
- i18n compliance: All user-facing strings properly use
next-intltranslations for all 5 supported languages. - Test coverage: Unit tests are provided for the fullscreen overlay UI and
hiddenColumnsprop. - Hook design: The
useFullscreenhook is well-designed and handles SSR gracefully withtypeof documentchecks. - State management: The
wasInFullscreenRefpattern correctly handles external fullscreen exit (via ESC key pressed at browser level).
Automated review by Claude AI
|
|
||
| try { | ||
| await fullscreen.request(document.documentElement); | ||
| } catch { |
There was a problem hiding this comment.
[CRITICAL] [ERROR-SWALLOWED] Fullscreen request errors are swallowed silently\n\nFile: src/app/[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsx:195\n\nEvidence: } catch { immediately returns without logging or user feedback.\n\nWhy this is a problem: Element.requestFullscreen() can reject (permission/user-gesture/browser policy). Swallowing the error makes the feature fail with no signal and is very hard to debug.\n\nSuggested fix:\n\ntsx\nimport { toast } from "sonner";\n\nconst handleEnterFullscreen = useCallback(async () => {\n if (!fullscreen.supported) return;\n\n wasInFullscreenRef.current = false;\n\n try {\n await fullscreen.request(document.documentElement);\n setIsFullscreenOpen(true);\n } catch (error) {\n console.error(error);\n toast.error(t("logs.error.fullscreenFailed"));\n }\n}, [fullscreen, t]);\n\n\nAlso add logs.error.fullscreenFailed to messages/*/dashboard.json.
There was a problem hiding this comment.
Code Review Summary
This PR adds a fullscreen overlay to dashboard usage logs (new useFullscreen hook, table customization props, and locale strings). One new error-handling path silently swallows fullscreen request failures, making the feature no-op with no signal.
PR Size: L
- Lines changed: 886
- Files changed: 13
- Split suggestions: Separate the unrelated v1 import-reorder changes (
src/app/v1/_lib/*) into a standalone PR to keep this UI feature-focused.
Issues Found
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Logic/Bugs | 0 | 0 | 0 | 0 |
| Security | 0 | 0 | 0 | 0 |
| Error Handling | 1 | 0 | 0 | 0 |
| Types | 0 | 0 | 0 | 0 |
| Comments/Docs | 0 | 0 | 0 | 0 |
| Tests | 0 | 0 | 0 | 0 |
| Simplification | 0 | 0 | 0 | 0 |
Critical Issues (Must Fix)
- [CRITICAL] [ERROR-SWALLOWED]
src/app/[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsx:195swallowsrequestFullscreen()failures (catch { return; }) without logging or user feedback. Confidence: 95.
High Priority Issues (Should Fix)
- None.
Review Coverage
- Logic and correctness
- Security (OWASP Top 10)
- Error handling
- Type safety
- Documentation accuracy
- Test coverage
- Code clarity
Automated review by Codex AI
There was a problem hiding this comment.
- Identified PR
#632and applied size labelsize/L(886 lines changed across 13 files). - Posted 1 inline review comment: [CRITICAL] [ERROR-SWALLOWED] silent fullscreen failure handling at
src/app/[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsx:195(suggested logging + user-facing toast using i18n). - Submitted the full review summary via
gh pr review --comment.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
🧪 测试结果
总体结果: ✅ 所有测试通过 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/app/`[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsx:
- Around line 203-206: Replace the generic load-failed i18n key with a
fullscreen-specific key in the catch block inside UsageLogsViewVirtualized (the
catch that currently calls t("logs.error.loadFailed")); change it to use
t("logs.error.fullscreenFailed") and add the corresponding translation entries
("logs.error.fullscreenFailed") to each
messages/{en,ja,ru,zh-CN,zh-TW}/dashboard.json so the toast shows a clear
"failed to enter fullscreen" message in all supported locales.
🧹 Nitpick comments (2)
src/app/[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsx (2)
178-184: 建议为 overview 数据加载失败添加用户反馈。当
fetchOverviewData失败时,界面会静默显示 0 值(通过overviewData?.concurrentSessions ?? 0等),用户无法区分"数据真的为 0"还是"加载失败"。考虑使用
onError回调或检查isError状态来提示用户:♻️ 建议的改进
const { data: overviewData } = useQuery<OverviewData>({ queryKey: ["overview-data"], queryFn: fetchOverviewData, enabled: isFullscreenOpen, refetchInterval: isFullscreenOpen ? 3000 : false, refetchOnWindowFocus: false, + meta: { + errorMessage: t("logs.error.loadFailed"), + }, });或在查询失败时显示 toast 提示。
432-443: 全屏视图的 VirtualizedLogsTable 配置正确。
autoRefreshEnabled={true}与autoRefreshIntervalMs={3000}确保全屏模式下数据实时更新。hiddenColumns与hideProviderColumn状态正确联动。关于 Line 442 的高度计算
h-[calc(100vh-56px-32px-40px)],建议添加注释说明各数值含义以提高可维护性:// 56px: header height, 32px: padding (p-4 * 2), 40px: bottom margin/buffer bodyClassName="h-[calc(100vh-56px-32px-40px)]"
| } catch (error) { | ||
| console.error("[UsageLogsViewVirtualized] Failed to enter fullscreen", error); | ||
| toast.error(t("logs.error.loadFailed")); | ||
| } |
There was a problem hiding this comment.
使用了错误的 i18n 键来提示全屏请求失败。
当前使用 t("logs.error.loadFailed") 作为全屏请求失败的提示消息,但这是一个通用的"加载失败"消息,不够明确。结合 PR 提交信息 "surface fullscreen request failures",应使用专门的全屏错误消息。
🔧 建议的修复
} catch (error) {
console.error("[UsageLogsViewVirtualized] Failed to enter fullscreen", error);
- toast.error(t("logs.error.loadFailed"));
+ toast.error(t("logs.error.fullscreenFailed"));
}同时需要在 messages/{en,ja,ru,zh-CN,zh-TW}/dashboard.json 中添加对应的 i18n 键:
{
"logs": {
"error": {
"fullscreenFailed": "无法进入全屏模式"
}
}
}🤖 Prompt for AI Agents
In `@src/app/`[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsx
around lines 203 - 206, Replace the generic load-failed i18n key with a
fullscreen-specific key in the catch block inside UsageLogsViewVirtualized (the
catch that currently calls t("logs.error.loadFailed")); change it to use
t("logs.error.fullscreenFailed") and add the corresponding translation entries
("logs.error.fullscreenFailed") to each
messages/{en,ja,ru,zh-CN,zh-TW}/dashboard.json so the toast shows a clear
"failed to enter fullscreen" message in all supported locales.
* fix: 清理 usage-doc / big-screen i18n 硬编码 + 修复 Next.js params Promise 报错 * feat(leaderboard): add user tag and group filters for user ranking (#607) * feat(leaderboard): add user tag and group filters for user ranking (#606) Add filtering capability to the leaderboard user ranking by: - userTags: filter users by their tags (OR logic) - userGroups: filter users by their providerGroup (OR logic) Changes: - Repository: Add UserLeaderboardFilters interface and SQL filtering - Cache: Extend LeaderboardFilters and include filters in cache key - API: Parse userTags/userGroups query params (CSV format, max 20) - Frontend: Add TagInput filters (admin-only, user scope only) - i18n: Add translation keys for 5 languages Closes #606 * refactor: apply reviewer suggestions for leaderboard filters - Use JSONB ? operator instead of @> for better performance - Extract parseListParam helper to reduce code duplication * feat(leaderboard): add tag/group suggestions dropdown for better UX - Fetch all user tags and groups via getAllUserTags/getAllUserKeyGroups - Pass suggestions to TagInput for autocomplete dropdown - Validate input against available suggestions - Consistent with /dashboard/users filter behavior * docs: update Privnode offer details in README files * fix: 修复 1M 上下文标头兼容问题 * fix: resolve container name conflicts in multi-user environments (#625) * fix: resolve container name conflicts in multi-user environments - Add top-level `name` field with COMPOSE_PROJECT_NAME env var support - Remove hardcoded container_name from all services - Users can now set COMPOSE_PROJECT_NAME in .env for complete isolation Closes #624 * fix: add top-level name field for project isolation Add `name: ${COMPOSE_PROJECT_NAME:-claude-code-hub}` to enable complete project isolation via environment variable. * feat(dashboard): improve user management, statistics reset, and i18n (#610) * fix(dashboard/logs): add reset options to filters and use short time format - Add "All keys" SelectItem to API Key filter dropdown - Add "All status codes" SelectItem to Status Code filter dropdown - Use __all__ value instead of empty string (Radix Select requirement) - Add formatDateDistanceShort() for compact time display (2h ago, 3d ago) - Update RelativeTime component to use short format Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(providers): add Auto Sort button to dashboard and fix i18n - Add AutoSortPriorityDialog to dashboard/providers page - EN: "Auto Sort Priority" -> "Auto Sort" - RU: "Авто сортировка приоритета" -> "Автосорт" - RU: "Добавить провайдера" -> "Добавить поставщика" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(i18n): improve Russian localization and fix login errors Russian localization improvements: - Menu: "Управление поставщиками" -> "Поставщики" - Menu: "Доступность" -> "Мониторинг" - Filters: "Последние 7/30 дней" -> "7д/30д" - Dashboard: "Статистика использования" -> "Статистика" - Dashboard: "Показать статистику..." -> "Только ваши ключи" - Quota: add missing translations (manageNotice, withQuotas, etc.) Login error localization: - Fix issue where login errors displayed in Chinese ("无效或已过期") regardless of locale - Add locale detection from NEXT_LOCALE cookie and Accept-Language header - Add 3 new error keys: apiKeyRequired, apiKeyInvalidOrExpired, serverError - Support all 5 languages: EN, JA, RU, ZH-CN, ZH-TW - Remove product name from login privacyNote for all locales Files changed: - messages/*/auth.json: new error keys, update privacyNote - messages/ru/dashboard.json, messages/ru/quota.json: Russian improvements - src/app/api/auth/login/route.ts: add getLocaleFromRequest() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(dashboard/users): improve user management with key quotas and tokens - Add access/model restrictions support (allowedClients/allowedModels) - Add tokens column and refresh button to users table - Add todayTokens calculation in repository layer (sum all token types) - Add visual status indicators with color-coded icons (active/disabled/expiring/expired) - Allow users to view their own key quota (was admin-only) - Fix React Query cache invalidation on status toggle - Fix filter logic: change tag/keyGroup from OR to AND - Refactor time display: move formatDateDistanceShort to component with i18n - Add fixed header/footer to key dialogs for better UX Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(dashboard/users): add reset statistics with optimized Redis pipeline - Implement reset all statistics functionality for admins - Optimize Redis operations: replace sequential redis.keys() with parallel SCAN - Add scanPattern() helper for production-safe key scanning - Comprehensive error handling and performance metrics logging - 50-100x performance improvement with no Redis blocking Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix(lint): apply biome formatting and fix React hooks dependencies - Fix useEffect dependencies in RelativeTime component (wrap formatShortDistance in useCallback) - Remove unused effectiveGroupText variable in key-row-item.tsx - Apply consistent LF line endings across modified files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: address code review feedback from PR #610 - Remove duplicate max-h class in edit-key-dialog.tsx (keep max-h-[90dvh] only) - Add try-catch fallback for getTranslations in login route catch block Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: translate Russian comments to English for consistency Addresses Gemini Code Assist review feedback. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test(users): add unit tests for resetUserAllStatistics function Cover all requirement scenarios: - Permission check (admin-only) - User not found handling - Success path with DB + Redis cleanup - Redis not ready graceful handling - Redis partial failure warning - scanPattern failure warning - pipeline.exec failure error logging - Unexpected error handling - Empty keys list handling 10 test cases with full mock coverage. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: John Doe <johndoe@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * feat(my-usage): cache statistics and timezone fixes (#623) * feat(my-usage): add cache token statistics to model breakdown Add cacheCreationTokens and cacheReadTokens fields to ModelBreakdownItem interface and related DB queries for displaying cache statistics in the statistics summary card modal. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(my-usage): use configured timezone for date filtering Use server timezone (TZ config) instead of browser locale when: - Filtering statistics by date (getMyStatsSummary) - Calculating daily quota time ranges (getTimeRangeForPeriod) This ensures consistent date interpretation across different client timezones. Fixes discrepancy between Daily Quota and Statistics Summary when user is in a different timezone than the server. Added comprehensive unit tests covering: - Date parsing in configured timezone - Timezone offset calculations - Day boundary edge cases * refactor(my-usage): clean up expiration displays Remove duplicate expiration information: - Remove Key Expires chip from Welcome header (keep User Expires only) - Remove "Expiring Soon" warning block from Quota Usage cards Improve countdown display in ExpirationInfo component: - Add Clock icon - Increase font size to match date display - Use monospace font for better readability - Color-coded by status (emerald/amber/red) ExpirationInfo remains the single source of expiration data. * fix: correct cache hit rate formula to exclude output tokens Output tokens are never cached (per Anthropic docs), so they should not be included in cache hit rate calculation. Changed formula from: cacheReadTokens / (input + output + cacheCreate + cacheRead) to: cacheReadTokens / (input + cacheCreate + cacheRead) Affects: - /my-usage model breakdown cache hit rate display - /dashboard/leaderboard provider cache hit rate ranking Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: address PR #623 review feedback - Fix outdated cache hit rate comment (leaderboard.ts:430) - Add keyboard accessibility to model breakdown rows (a11y) - Rename totalTokens -> totalInputTokens in ProviderCacheHitRateLeaderboardEntry - Extract parseDateRangeInServerTimezone helper to reduce duplication Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: add backward compatibility for totalTokens field Keep returning totalTokens (deprecated) alongside totalInputTokens for API consumers that haven't migrated yet. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: John Doe <johndoe@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Set HOSTNAME environment variable in Dockerfile (#622) Add HOSTNAME environment variable for container * fix: inherit 1M flag from client Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(my-usage): make date range DST-safe Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * test(api): cover leaderboard comma-list parsing Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(auth): avoid hardcoded server error fallback Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(actions): localize key quota permission errors Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * docs: clarify context 1M inherit behavior Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * test(settings): fix model multi-select messages loader Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * test(dashboard): provide QueryClientProvider in edit key form test Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * chore(scripts): avoid hardcoded docker container names Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(i18n): replace fullwidth parentheses in ja dashboard Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(ui): add a11y label and clean up dialog styles Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * chore: ignore tmp scratch directory Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat: Dashboard Logs:秒级时间筛选 + Session ID 精确筛选/联想/展示(含回归修复) (#611) * feat: add sessionId filter for usage logs * feat: add seconds-level time filters for logs * feat: wire sessionId into logs URL filters * chore: add i18n keys for logs sessionId * feat: add sessionId column to logs tables * feat: add sessionId suggestions for logs * docs: document dashboard logs call chain * test: add logs sessionId/time filter coverage config * fix: keep sessionId search input focused * fix: drop leaked page param on logs apply * fix: reload sessionId suggestions on scope change * fix: harden logs url params and time parsing * fix: avoid keys join for sessionId suggestions * test: strengthen empty sessionId filter assertions * chore: format logs sessionId suggestions test * Update src/actions/usage-logs.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * feat: 补充公共静态变量 SESSION_ID_SUGGESTION_LIMIT * fix: use prefix LIKE for sessionId suggestions * refactor: centralize usage logs sessionId suggestion constants * refactor: simplify logs url filters parsing * refactor: reuse clipboard util for sessionId copy * chore(db): add sessionId prefix index * docs: clarify sessionId suggestion semantics * test: add escapeLike unit tests * chore: apply biome fixes for sessionId search * feat: include session id in error responses * test: add coverage suite for session id errors * docs: add guide for error session id * chore: format code (feat-logs-sessionid-time-filter-233f96a) * feat(dashboard/logs): add fullscreen mode (#632) * Fix provider exhaustion after model redirect (refs #629) (#633) * Fix provider fallback after model redirect Use original model for provider selection during failover and tolerate tool_result blocks in non-stream converters to prevent premature provider exhaustion. References #629. * Add regression test for model redirect provider selection Ensures provider selection uses original model even when current model is redirected (refs #629). * chore: format code (fix-629-provider-fallback-toolresult-b17f671) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: YangQing-Lin <56943790+YangQing-Lin@users.noreply.github.com> Co-authored-by: SaladDay <92240037+SaladDay@users.noreply.github.com> Co-authored-by: miraserver <20286838+miraserver@users.noreply.github.com> Co-authored-by: John Doe <johndoe@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: hwa <yll2002mail@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Ding <ding113@users.noreply.github.com> Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Summary
Add fullscreen mode support for the dashboard usage logs page. This feature allows users to view logs in an immersive fullscreen overlay with real-time metrics (concurrent sessions, today's requests, cost, and response time).
Problem
When monitoring usage logs on the dashboard, users may want a distraction-free, maximized view to focus on log analysis, especially during active monitoring or debugging sessions. The existing logs table view is embedded within the dashboard layout with limited vertical space.
Solution
Introduce a fullscreen overlay mode for the usage logs table with:
Fullscreen Hook (
src/hooks/use-fullscreen.ts)Fullscreen Overlay UI (
usage-logs-view-virtualized.tsx)Enhanced VirtualizedLogsTable (
virtualized-logs-table.tsx)hideStatusBar,hideScrollToTop,hiddenColumns,bodyClassNameChanges
Core Changes
src/hooks/use-fullscreen.tssrc/app/[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsxsrc/app/[locale]/dashboard/logs/_components/virtualized-logs-table.tsxi18n Updates
messages/{en,ja,ru,zh-CN,zh-TW}/dashboard.jsonfullscreen,exitFullscreen,hideProviderColumn,showProviderColumnstringsTests
tests/unit/dashboard-logs-fullscreen-overlay-ui.test.tsxsrc/app/[locale]/dashboard/logs/_components/virtualized-logs-table.test.tsxhiddenColumnspropOther
src/app/v1/_lib/codex/chat-completions-handler.tssrc/app/v1/_lib/proxy-handler.tssrc/app/v1/_lib/proxy/error-handler.tsTesting
Automated Tests
hiddenColumnspropManual Testing
/dashboard/logsPre-commit Verification
Checklist
Description enhanced by Claude AI