fix(evolve): recover AI progress across navigation#16
Open
Xnhyacinth wants to merge 6 commits into
Open
Conversation
Add robust backend progress recovery for Evolve tabs, prevent stale transient errors from masking active runs, and improve Twin run history/status behavior. Also harden AI engine selection, sync writes, i18n flows, and add regression coverage for streaming, cache recovery, and Twin integrity. Signed-off-by: xnhyacinth <huanxuanliao@gmail.com>
Signed-off-by: xnhyacinth <huanxuanliao@gmail.com>
Signed-off-by: xnhyacinth <huanxuanliao@gmail.com>
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.
Summary
This PR stabilizes the AI/Evolve and Twin flows after the latest
mainmerge. It focuses on restoring backend-backed results, keeping active AI runs visible after navigation, and hardening Twin run recovery/sync behavior.Feature Additions
/api/twin/runsand related run metadata helpers for history rendering and exact run resume.run_idinstead of mixing data across runs.profile,memory, and other tabs can be surfaced and moved into the shared cache path.Bug Fixes
#aiprofile/memorypanels showing empty/no-cache states even when backend or legacy cache results already exist.#aiactive Evolve runs being hidden by stale localTimeout/network error cache after switching away and returning.run_idresume.CHATVIEW_CLAUDE_MD/test-scoped writes go to the requested target instead of touching the real global~/.claude/CLAUDE.md.typing.Optional/typing.Union.origin/mainand resolve conflicts withmainbehavior as the base, then reapply the Evolve/Twin recovery logic on top.Validation
python3 -m unittest tests.test_api.TestTwinSyncScoping tests.test_api.TestTwinRunScopingReads tests.test_api.TestTwinResumeLatestTrait tests.test_api.TestTwinAvatarScoping tests.test_api.TestTwinResumeCheckpointOnly->Ran 13 tests ... OKpython3 -m py_compile server.py analyze.py db.py chatview/ai_engine.py chatview/cli.py chatview/server.py chatview/handlers/twin.py chatview/utils/sync.py-> exit code 0python3 - <<'PY' ... ast.parse(..., feature_version=(3, 9)) ... PY->chatview/utils/sync.py: py39 ast ok,chatview/ai_engine.py: py39 ast oknode --check static/evolve.js && node --check static/twin.js-> exit code 0ruff check .->All checks passed!python3 -m unittest discover -s tests->Ran 159 tests ... OK (skipped=3)28465262479->lint,test (3.9),test (3.11), andtest (3.13)passed