Repository navigation
refactor(ui): share chat import recovery lifecycle - #180998
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
Merged via squash auto-merge.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 23, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Problem This Solves
HTML previews and question cards duplicate the same lazy-import failure and retry lifecycle.
User Impact
No user-visible change. Loading, retry, stale-build recovery, source replacement, retained preview frames, question focus, tags, classes, and lazy import timing stay the same.
Why This Change Was Made
Both callers now use one chat-local import boundary. Each still supplies its own source identity, loading view, and connection check: preview recovery follows file/content identity and its retry button; questions follow request identity and the native card host. Only the failed recovery subtree is keyed, so successful content keeps its lifetime.
Production LOC in the affected files: 237 → 202 (−35). Tests are unchanged (403 → 403 across the two loading suites). No new dependency or startup import. This is a source consolidation, not a CPU-speedup claim.
Evidence
Acceptance rule set before measurement: same-machine base/head production builds; no boot-surface growth beyond 64 B build variance; preserve request counts and one startup CSS request. Base:
3a2f16623c12b9daafa100bbf198016d6a399cf4.pnpm tsgo:ui)createMemo4 → 2;onSettled2 → 1;createEffect,onCleanup,untrack, direct listeners, DOM queries,flush, and owner APIs all 0 → 0ci:fullrequestedNo visual changes; the existing loading suites verify the retained DOM behavior.
Scope census
Before this PR, chat contains 165,513 production TypeScript/TSX lines (171,617 including CSS), plus 207,617 test/support lines. Scoped jscpd found 21 exact production clone pairs / 202 duplicated lines. The large one-caller helpers examined own real lifecycle, authority, or derivation behavior. No dead chat exports or flags were proven. The other verified production family above approximately 20 removable lines is rail JSX prop typing (#181010, −22 lines); duplicated attachment-test setup is addressed in #181002 (−37 test lines). Together the three focused PRs remove 57 production and 37 test lines. The census does not justify forcing a 3% production deletion through behavior changes or formatting.