You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(web): display composer countdown indicators in HostUsageDock - #1113
Display Thread usage composerIndicators (e.g. Claude Code's prompt cache countdown) in Standalone Web's composer dock (HostUsageDock), matching the existing Host contract already projected into codexhostUsage.
Changes
apps/web-ui/packages/client/ui-codexhost/src/client/usage.ts: Reuse ThreadUsageSnapshot["composerIndicators"] from @codexhost/shared-contracts on HostThreadUsage.
apps/web-ui/packages/client/ui-codexhost/src/client/locales.ts: Add English and Chinese remaining-minute strings (usage.indicator.remaining).
Render active countdown indicators independently between account quota and usage summary in HostUsageDock, suppressed on official Codex Threads (harnessIdentity?.id === "codex").
Match Desktop semantics: visible only when 0 < remaining <= 50m, formatted as clock icon + {minutes}m, refreshed on window-entry/minute boundaries and visibilitychange, hidden and timer-cleaned on expiry.
Localize label/tooltip via localizeHarnessText and show details with Tooltip (side="top", portal, openOnClick) for desktop hover/keyboard focus and touch tap without side-effect actions.
Yield before public quota/usage controls on narrow viewports via ResizeObserver, taking the clipped indicator out of flex flow so no blank gap remains and restoring it automatically when space returns.
docs/architecture/harness-plugin-runtime.md: Document Standalone Web display placement and behavior for composerIndicators.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
Recent review details
Context from checks skipped due to timeout: 8
GitHub Check: CodeRabbit
GitHub Check: Check Linux ARM64
GitHub Check: Check ubuntu-22.04
GitHub Check: Check macos-26
GitHub Check: Check windows-latest
GitHub Check: Static checks
GitHub Check: Web Host tests
GitHub Check: Vitest
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 1
Source excerpt: Do not write browser, e2e, or component tests for Web pages (`apps/web-ui`); the user checks page changes directly.
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
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
Display Thread usage
composerIndicators(e.g. Claude Code's prompt cache countdown) in Standalone Web's composer dock (HostUsageDock), matching the existing Host contract already projected intocodexhostUsage.Changes
apps/web-ui/packages/client/ui-codexhost/src/client/usage.ts: ReuseThreadUsageSnapshot["composerIndicators"]from@codexhost/shared-contractsonHostThreadUsage.apps/web-ui/packages/client/ui-codexhost/src/client/locales.ts: Add English and Chinese remaining-minute strings (usage.indicator.remaining).apps/web-ui/packages/client/ui-codexhost/src/client/HostUsageDock.tsx&HostUsageDock.module.css:HostUsageDock, suppressed on official Codex Threads (harnessIdentity?.id === "codex").0 < remaining <= 50m, formatted as clock icon +{minutes}m, refreshed on window-entry/minute boundaries andvisibilitychange, hidden and timer-cleaned on expiry.label/tooltipvialocalizeHarnessTextand show details withTooltip(side="top",portal,openOnClick) for desktop hover/keyboard focus and touch tap without side-effect actions.ResizeObserver, taking the clipped indicator out of flex flow so no blank gap remains and restoring it automatically when space returns.docs/architecture/harness-plugin-runtime.md: Document Standalone Web display placement and behavior forcomposerIndicators.Demo Screenshots (sanitized fixture)
Validation
prettier --checkon all 5 edited files: passedtsc -p apps/web-ui/tsconfig.json --noEmit: passed@deepseek-ai/dsh-client-ui-codexhostbrowser bundle (tsdown): passedweb-server+ mock CH host fixture:提示词缓存 · 剩余 33 分钟)openOnClick)hasIndicator: false)