Skip to content

🥧 refactor: Show Failed Call Fractions and Preview Age - #16468

Merged
danny-avila merged 5 commits into
devfrom
lia/failed-count-denominator
Sep 29, 2026
Merged

danny-avila merged 5 commits into
devfrom
lia/failed-count-denominator

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Collapsed activity phases and tool groups say only 1 failed, so a reader cannot tell whether one of two calls failed or every call failed. The phase preview also lacks a failure age even when a run-step closure has a reliable timestamp. An expanded live phase could also show the same failure pill again beside a nested tool group. This change shows failed/total failed in both badges and accessible headers, gives the parent phase sole ownership of its pill while preserving live group expansion, and displays the first failed call's localized relative age in its collapsed preview. Older parts without a close timestamp keep the preview without a fabricated time.

The color-gradient idea is intentionally deferred: the shared theme exposes warning and error roles, but no intermediate orange role. Adding an untested interpolation here would risk contrast and high-contrast themes.

How it works

Tool parts (reasoning/labels/sparse slots excluded) -> summarizeSpan -> failed + total -> phase badge/live announcement
ToolCallGroup metadata -> failed + total -> standalone badge or nested header (parent phase owns the sole badge)
Host close event -> validated runStepClosedAt -> saved/live/replayed tool part -> first failed peek -> locale-aware relative <time>
Detached task receipt -> settledAt (not dispatch time) -> failed peek

Type of change

  • Bug fix
  • Feature
  • Translation
  • Tests / tooling / CI

Testing

Tested environments/configuration: Node.js 24, isolated LibreChat worktree. Local installed dependencies are incomplete, so CI is the source of full Jest/typecheck results.

Automated tests: Added/updated focused phase, live nested-group integration, group, failure-line, SSE-close and timestamp-validation tests. Parsed changed TypeScript/JavaScript with the local TypeScript compiler and smoke-tested the close-time helper. Ran targeted import sort, Prettier, git diff --check, and unused-i18n-key checks. Attempted focused Jest tests, tsc --noEmit in client, packages/api and packages/data-provider, and npm run build in packages/data-provider; these cannot complete locally because the installed node_modules lack Jest dependencies, @types entries, and tsdown. The attempted local static-checks passed Prettier and import sorting but could not run ESLint and circular dependency checks for the same reason. CI will rerun with installed dependencies.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Review handoff for head e2b9130c0c57d6ed7badb4050e8d10d951bddf46: failed/total counts in activity and group badges, persisted close times for relative age in collapsed failure previews, with regression tests. Please review this exact head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Review handoff for head efbd20222c13f625e5d0c94c5d65a59992f05def: same failure fractions and relative preview age, with unused English labels removed after confirming no runtime consumers. Please review this exact head.

@lia-by-librechat

lia-by-librechat Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Review handoff for head baa5596b35082261aa4c931e9825a4e1ce5e25f8: added a live SSE close-event regression test to the failed/total and preview-age change. Please review this exact head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Review handoff for head 14a5e31b3904178d2afbf5d4d24551b9737cf38a: resolved the Static Checks no-nested-ternary finding in the accessible badge label selection. Prior head passed Ubuntu tests, client/API typechecks and data-provider tests; please review this exact new head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Review handoff for head d8d05640f31bd63d2714bb0e243d757bbc77dfb6: an expanded live phase now owns the sole failure pill; nested tool groups keep their failure detail and live expansion. Includes integration and grouped-call regressions for the duplicate in the screenshot. Please review this exact head.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review

@danny-avila danny-avila changed the title 🥧 fix: Show Failed Call Fractions and Preview Age 🥧 refactor: Show Failed Call Fractions and Preview Age Sep 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T22:59:55.592419Z d8d0564 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: d8d05640f3

ℹ️ 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".

@danny-avila
danny-avila merged commit 7e786ba into dev Sep 29, 2026
36 checks passed
@danny-avila
danny-avila deleted the lia/failed-count-denominator branch September 29, 2026 00:55
@danny-avila danny-avila mentioned this pull request Sep 29, 2026
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants