editor: slide activity rows to the newest window instead of the oldest - #501
Merged
Merged
Conversation
A thread with more activity than one projection kept (256 facts, oldest first) stopped showing new tool calls: every replay re-picked the same oldest rows, so the live turn's commands never projected while its prose kept streaming. Activity now slides like the loaded conversation: a projection keeps the newest facts that fit beside the snapshot's durable items, and replay removes derived facts that slid out before upserting, so their room goes to live work instead of stalling at the scene bound. Ordinals count every projectable row, so a fact keeps its place while the window moves. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.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.
Why
In a long thread (VeriGuard, 381 activity items), tool calls stopped appearing after the first few commands of the live turn while prose kept streaming.
project_activitiessorted every retained row oldest-first and truncated toMAX_PROJECTED_FACTS = 256, so each replay re-picked the same oldest rows and the newest were never projected. The Forge had stored and delivered all of them (132 commands in the live run).What
activity_window(snapshot)=SCENE_MAX_ITEMS - snapshot.items().len(). The projection keeps the newest facts that fit and reports the rest asevicted.SceneConflict) and drop the newest row.ConversationStateController::derived_fact_ids/ConversationHost::derived_fact_idsexpose the derived facts for that removal.Tests
activity_slides_to_the_newest_window_and_frees_room_for_live_workfills a turn past the window, checks the oldest rows slid out and the newest are kept, then adds live work and checks it takes the freed room. It fails against the old projection.cargo test -p artisan-frontend --test conversation_observation_projection: 21 passed.--lib: 775 passed, 3 failed.work_group_header_row_paints_without_a_disclosure_wrapper,send_has_stable_identity…andharness_switch_animation_settles_without_rebuilding_catalogfail identically on master.Follow-up, not in this PR: snapshots whose own durable items exceed
SCENE_MAX_ITEMSare still refused, and older turns are never range-loaded.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes activity projection so the newest tool calls appear in long threads instead of being stuck behind the oldest retained rows.
Written for commit 088d84a. Summary will update on new commits.