Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

Degrade Stream by capability - #35

Merged
cauyxy merged 2 commits into
masterfrom
yxinyux/issue-26-stream-capability-degradation
Jul 18, 2026
Merged

cauyxy merged 2 commits into
masterfrom
yxinyux/issue-26-stream-capability-degradation

Conversation

@cauyxy

@cauyxy cauyxy commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Split Stream into independent service, polling freshness, display-window, crop, and one-off action capabilities.
  • Preserve semantic problems across Rust/Specta/API boundaries and localize recovery copy only at presentation time.
  • Keep the live workflow stable across locale changes and distinguish stale status from authoritative stopped or failed state.
  • Refresh current truth documentation with implementation-backed citations.

Testing

  • npm run check
  • npm run test:unit
  • npm run test:rust
  • npm run verify -- --source-only
  • Browser Preview at 127.0.0.1:14207/stream in English and Chinese; no console warnings/errors or viewport overflow
  • macOS npm run tauri dev startup smoke; real install/database detected and overlay returned HTTP 200
  • Native dev window could not be attached for automated UI interaction; no state-changing Stream action was executed

Closes #26

Release Notes:

  • 直播页现在会按服务、轮询、展示窗口和叠加层配置分别降级,并在切换语言时保持当前直播会话。

@cauyxy
cauyxy merged commit 99a79b5 into master Jul 18, 2026
2 of 4 checks passed
@cauyxy
cauyxy deleted the yxinyux/issue-26-stream-capability-degradation branch July 18, 2026 18:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 622adb8e09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 292 to +295
if (
!this.isCurrentLifecycle(lifecycle) ||
epoch !== this.statusEpoch ||
request < this.latestSuccessfulPollRequest
)
return;
request !== this.latestPollRequest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Count slow poll failures before keeping status fresh

When getStatus() failures take longer than the 2s polling interval, each later interval increments latestPollRequest before the earlier request rejects, so this guard discards every failed response as outdated. With no newer successful status, consecutivePollFailures never reaches the threshold and the snapshot stays fresh, leaving running-only controls enabled against an actually stale service state; the failure path should ignore only failures older than a newer success, not older than any newer request.

Useful? React with 👍 / 👎.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

让 Stream 按能力降级而不是整页失败

1 participant