Repository navigation
Surface plan mode transitions in timeline for Antigravity and Claude - #1223
Merged
Merged
Conversation
The index holds what an item carries, not the UI's words for it; an English "Entered plan mode" fallback would match only in English and never in the locale the timeline shows.
# Conflicts: # crates/agent/src/antigravity.rs
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 changed
When running Antigravity's Orchestrator models (such as
Orchestrator (Neon)), the planning model hands off its Markdown blueprint viaexit_plan_mode(rawInput.plan), and the execution model hands control back viaenter_plan_mode(rawInput.reason). Previously both calls fell through to genericItemContent::ToolCallitems folded into the Work Log as raw JSON, hiding the planner/executor phase boundaries inside a single activity run.crates/agent/src/lib.rs,crates/protocol/src/lib.rs):ItemContent::PlanModeEntered { reason: Option<String> }(plan_mode_entered) as the canonical counterpart toItemContent::Plan, noted underUnreleasedabovePROTOCOL_VERSION(Principle 9).Run exit_plan_modenow maps into the existingItemContent::Plan { markdown }owner;Run enter_plan_modemaps intoItemContent::PlanModeEntered { reason }. Failed updates revert to a failedItemContent::ToolCallso errors stay visible, andexit_plan_modecalls without plan text fall through unchanged.EnterPlanModenow maps intoItemContent::PlanModeEntered { reason: None }on success and falls back to a failed/declinedItemContent::ToolCallwhenis_erroris true.crates/core,crates/services):PlanModeEnteredinsession.rs, included it inrelay.rs, indexed it under"plan_mode_entered"inthread_index.rsandsession_search.rs, and formatted it inexport.rs.crates/ui,locales/{en,zh-CN,ja}.yml):Segment::PlanModeEnteredbreaks out ofActivityRunalongsideSegment::Plan, separating planning and execution activity runs cleanly.notices::said_lineprimitive with an optionalbodyfield (and multi-line expandability) rather than duplicating a disclosure component:PlanModeEnteredrenders as a centered muted line withIconName::Map, showing a one-line summary ofreasonwhen present and opening the fullreasonin a disclosure card when clicked.chat.plan_mode_enteredandchat.plan_mode_entered_reasontoen.yml,zh-CN.yml, andja.yml.Tests
agent::antigravity::tests::plan_mode_tools_map_to_plan_and_plan_mode_entered: verifies ACPRun exit_plan_mode/Run enter_plan_modemapping acrosstool_call->tool_call_update, failure fallback toToolCall, and empty-plan passthrough.agent::claude::tests::enter_plan_mode_maps_to_plan_mode_entered_and_keeps_errors_visible: verifiesEnterPlanModesuccess mapping and error fallback.tcode_ui::chat::model::tests::segmentation_preserves_message_order_and_groups_adjacent_activities: extended to coverPlanandPlanModeEnteredsplittingActivityRunsegments anddisclosure_keysregistration.tcode_ui::chat::timeline::render::tests::plan_mode_entered_discloses_multiline_reason_on_click: verifiesPlanandPlanModeEnteredrender outside the Work Log and clicking a multi-linePlanModeEnteredline expands its disclosure body.Verification
cargo fmt --all --check— passedcargo machete— passedRUSTUP_TOOLCHAIN=1.100.1 mbx clippy --workspace --all-targets --locked -- -D warnings— passedRUSTUP_TOOLCHAIN=1.100.1 mbx nextest run --workspace --locked --no-fail-fast -E 'not test(=claude::tests::a_session_previews_rewinds_and_reports_the_part_claude_refused)'— 1544 passed, 4 failed due to local environment gaps (wayland-nesttests requiresway; twotcode-traversetests require IPv6 loopback); all affected crates (agent,tcode-core,tcode-protocol,tcode-services,tcode-runtime,tcode-ui,tcode,tcode-headless) passed with zero failures.mbx run -p agent --example probe --locked -- antigravity ... --model gemini-pro-orchestrator-neonagainstagy 1.5.20— observeditem_started/item_completedfor bothplanandplan_mode_entered.Orchestrator (Neon)turn in the desktop build under a throwawayTCODE_DATA_DIR, verified the Plan card, separated execution Work Log, collapsed进入规划模式line, and expanded multi-line disclosure card.