Skip to content

Rename Agent Mode chats and sessions to tasks#642

Merged
marksftw merged 4 commits into
masterfrom
codex/agent-task-terminology
Jul 18, 2026
Merged

Rename Agent Mode chats and sessions to tasks#642
marksftw merged 4 commits into
masterfrom
codex/agent-task-terminology

Conversation

@marksftw

@marksftw marksftw commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Closes #639

Summary

  • Rename user-facing Agent Mode chats and sessions to tasks across navigation, history, dialogs, settings, MCP controls, accessibility labels, and Maple-owned error strings.
  • Preserve Chat Mode wording and Maple’s internal session APIs, storage, runtime flow, and task-creation semantics.
  • Add only the small shared-component parameters needed to show chat in Chat Mode and task in Agent Mode, including routing the sidebar action to each mode’s existing new-item callback.
  • Change the default visible Agent title from New agent session to New task.

Scope

This PR is a user-facing language change only:

  • It does not match, parse, or rewrite user messages, Goose output, framework notices, or ordinary runtime errors.
  • It does not queue New Task requests during initialization.
  • It does not change folder selection, runtime startup parameters, or task persistence timing.
  • The Agent sidebar action uses the existing createSession() flow only when Agent settings are unlocked; Chat Mode continues to use its existing addChat() flow.

The separate initialization/disabled-state behavior improvement is tracked in #645.

User impact

Agent Mode consistently presents durable work as tasks while Chat Mode retains chat terminology. Existing Agent history and internal session data remain unchanged.

Validation

  • bun run typecheck
  • bun test — 131 passed
  • bun run lint — 0 errors, 12 pre-existing warnings
  • Prettier checks for the changed frontend files
  • cargo fmt --all -- --check
  • cargo test — 123 passed
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Agent Mode now presents sessions as tasks, uses “New task” defaults, rewrites selected errors and framework notices, and supports deferred task creation through project-root selection while preserving chat-mode behavior.

Changes

Agent task experience

Layer / File(s) Summary
Task titles and framework notices
frontend/src-tauri/src/agent.rs
Adds task title defaults, targeted framework-notice rewriting, bounded timeline rendering, and related tests.
Backend task lifecycle errors
frontend/src-tauri/src/agent.rs
Updates model-lock, creation, loading, MCP, deletion, rollback, permission, and execution messages to use task terminology.
New task creation and Agent UI
frontend/src/components/AgentMode.tsx, frontend/src/components/Sidebar.tsx, frontend/src/components/chat/ChatTurn.tsx, frontend/src/components/DeleteChatDialog.tsx
Adds deferred task creation and task-specific labels, actions, accessibility text, empty states, and deletion copy.
Task errors, MCP copy, and history settings
frontend/src/services/agentMcpErrors.ts, frontend/src/services/agentMcpErrors.test.ts, frontend/src/components/agent/AgentMcpControls.tsx, frontend/src/components/settings/*, frontend/src/components/UpgradePromptDialog.tsx
Adds targeted Agent error normalization and updates MCP, upgrade, account deletion, and history settings wording.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Sidebar
  participant AgentMode
  participant ProjectRootChooser
  User->>Sidebar: Select New Task
  Sidebar->>AgentMode: requestNewTask()
  AgentMode->>AgentMode: wait for initialization and unlocked settings
  alt project root exists
    AgentMode->>AgentMode: createSession()
  else project root missing
    AgentMode->>ProjectRootChooser: chooseProjectRoot()
  end
Loading

Possibly related PRs

Suggested reviewers: anthonyronning

Poem

I’m a rabbit with tasks in my queue,
“New Task!” is the button I chew.
Old titles transform,
Errors take task form,
And MCP words hop neatly through.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes match the issue by updating Agent-mode UI copy, labels, and errors to task terminology while leaving Chat mode and internal session concepts intact.
Out of Scope Changes check ✅ Passed No clearly unrelated changes appear; the edits stay within Agent-mode terminology, supporting UI, dialogs, settings, and related error copy.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: renaming Agent Mode chat/session terminology to tasks.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/agent-task-terminology

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4a84ffc
Status: ✅  Deploy successful!
Preview URL: https://ab057a0a.maple-ca8.pages.dev
Branch Preview URL: https://codex-agent-task-terminology.maple-ca8.pages.dev

View logs

@marksftw
marksftw force-pushed the codex/agent-task-terminology branch from 7cb82de to 160b5f1 Compare July 17, 2026 16:34
@marksftw
marksftw marked this pull request as ready for review July 17, 2026 17:30

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Comment thread frontend/src-tauri/src/agent.rs Outdated
Comment on lines +63 to +68
const LEGACY_AGENT_UNTITLED_TITLES: [&str; 4] = [
"New agent session",
"Agent session",
"New chat",
"Untitled chat",
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need legacy / backwards compatibility stuff in this new code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be resolved now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh shoot, resolving branch conflicts real quick

@marksftw
marksftw force-pushed the codex/agent-task-terminology branch from 160b5f1 to 08627b0 Compare July 17, 2026 18:28
coderabbitai[bot]

This comment was marked as resolved.

@marksftw
marksftw force-pushed the codex/agent-task-terminology branch from 08627b0 to 96b6400 Compare July 17, 2026 18:41
@marksftw
marksftw requested a review from AnthonyRonning July 17, 2026 19:36
@AnthonyRonning

Copy link
Copy Markdown
Contributor

Needs rebase.

@marksftw

Copy link
Copy Markdown
Contributor Author

Needs rebase.

yeah I caught that just as I hit the review button

@marksftw
marksftw force-pushed the codex/agent-task-terminology branch from 96b6400 to 17d84f1 Compare July 17, 2026 19:41
coderabbitai[bot]

This comment was marked as resolved.

@marksftw
marksftw force-pushed the codex/agent-task-terminology branch from 17d84f1 to 9174e56 Compare July 17, 2026 19:51
@marksftw
marksftw marked this pull request as draft July 17, 2026 20:17

@AnthonyRonning AnthonyRonning left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes because this PR has expanded substantially beyond the terminology change described in #639.

The intended scope is to change user-facing Agent terminology from “chat/session” to “task,” while leaving internal session APIs, storage, and existing behavior unchanged.

This PR currently includes two additional categories of work:

  1. It changes New Task behavior, including initialization queuing, folder-selection flow, runtime startup parameters, and when an empty task is persisted.
  2. It introduces string matching and rewriting for messages and errors emitted by Goose.

The New Task behavior may be fixing a legitimate problem, but it should not be bundled into a terminology PR. Please revert those behavioral changes here. If the current New Task flow is broken or inadequate, document the existing behavior, the desired behavior, and the relevant edge cases in a separate issue, then address it in a focused PR with direct tests.

I also do not want Maple matching exact Goose prose and rewriting it. This is brittle, couples Maple to Goose’s English wording, and risks modifying content based on text rather than a structured signal. The tests confirm the string-matching implementation, but they do not make that integration boundary maintainable.

Please remove the Goose string-rewriting logic from this PR. If Goose exposes user-facing session terminology that Maple needs to translate, handle that separately through a structured design—for example, typed error/notice categories from Goose, or a single adapter that maps Goose events into Maple-owned enums and presentation copy. That design deserves its own issue and PR.

For this PR, please keep the changes narrowly limited to:

  • Static user-facing Agent labels, descriptions, dialogs, tooltips, and accessibility text.
  • Small shared-component parameters needed to display “chat” in Chat Mode and “task” in Agent Mode.
  • Maple-owned user-facing error strings where changing the literal at its source is straightforward.
  • The default visible Agent title changing from “New agent session” to “New task.”

Please do not include runtime-flow changes, new task-creation semantics, initialization state handling, or rewriting of unstructured Goose content. Once the PR is reduced to that scope, I’ll review it again.

@marksftw

Copy link
Copy Markdown
Contributor Author

Removed the two feature-specific runtime text rewriters so this PR remains a static Maple UI terminology change and does not scan or alter user or Goose text.

What changed:

  • Removed the Rust framework-notice transformer that searched assistant and system messages for exact Goose phrases and changed session to task.
  • Removed the frontend runtime-error transformer that searched ordinary errors for session phrases.
  • User messages, Goose assistant and system text, and ordinary non-MCP errors now pass through without terminology rewriting. The existing system-notice display length limit is unchanged.
  • Kept the pre-existing MCP connection-error sanitizer, which classifies and cleans up MCP connection failures rather than performing Task/Session terminology rewriting.
  • External messages may therefore continue to say session, including messages such as Session not found.

Validation: cargo test (123 passed), frontend tests, type checking, formatting, and linting all passed. This is included as the separate commit b4719d4.

@AnthonyRonning

Copy link
Copy Markdown
Contributor

Thanks—removing both runtime text rewriters addresses my Goose/error-mapping concern.

The other requested scope change is still outstanding. The PR still contains the New Task behavioral changes, including:

  • isNewTaskRequested and the initialization-time queue
  • the effect that processes a deferred New Task request
  • returning a path from chooseProjectRoot
  • passing an explicit project root through startRuntime and createSession
  • creating a persisted task immediately after folder selection
  • keeping the New Task action enabled while initialization is running

Those are functional changes, not terminology changes. Please remove them from this PR and restore the previous initialization, folder-selection, runtime-start, and session-creation behavior.

I understand that the shared sidebar needs a mode-aware label and may need a small callback parameter so a button labeled “New Task” does not execute Chat Mode’s addChat() behavior. That narrow shared-component adjustment is fine. The new deferred-creation state machine and folder-selection semantics are not.

If the existing New Task action has a behavioral bug, please document it separately with the current behavior, desired behavior, and edge cases, then address it in a focused PR with direct tests.

Please also update the PR description after removing this behavior; it currently still advertises initialization queuing and the disabled-state fix. Once that remaining behavior is separated, the terminology PR will match the requested scope.

@marksftw

Copy link
Copy Markdown
Contributor Author

Updated: the latest head removes the remaining New Task behavior expansion so this PR is limited to the requested terminology change.

What is now in place:

  • Removed isNewTaskRequested, the deferred-request effect, and all initialization-time queuing.
  • Restored chooseProjectRoot, startRuntime, and createSession to their previous signatures and flow; there is no explicit-root threading or task creation after folder selection.
  • Restored initialization locking, so New Task is disabled while Agent settings are initializing or otherwise locked.
  • Kept only the narrow shared Sidebar callback allowed in the review: Chat Mode uses its existing addChat() path, while Agent Mode uses its existing createSession() path once unlocked.
  • Removed both Goose/runtime text rewriters; user messages, Goose output, and ordinary runtime errors are not terminology-scanned or rewritten.
  • Updated the PR description so it no longer advertises queuing or the disabled-state fix.

The separate transition/disabled-state improvement, including the current behavior, desired behavior, edge cases, persistence decision, and required direct tests, is tracked in #645.

Relevant commits: 570b759 and 4a84ffc.

Validation: 131 frontend tests and 123 Rust tests passed, along with type checking, formatting, git diff --check, and lint with 0 errors (12 pre-existing warnings).

@marksftw
marksftw marked this pull request as ready for review July 17, 2026 21:00

@AnthonyRonning AnthonyRonning left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requested scope changes are now addressed. The Goose/runtime string rewriting is removed, the New Task behavior work is separated into #645, and this PR is appropriately limited to user-facing terminology plus the minimal mode-aware sidebar routing.

Approved. Please squash and merge this PR.

@marksftw
marksftw merged commit 2aaa815 into master Jul 18, 2026
18 checks passed
@marksftw
marksftw deleted the codex/agent-task-terminology branch July 18, 2026 12:34
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.

Rename Agent chats and sessions to tasks in user-facing UI

2 participants