Skip to content

merge: upstream 564e916 (#423 side-session Esc and run timer, on 0.6.0/0.6.1 sync) - #110

Merged
tournierjc merged 36 commits into
mainfrom
merge/upstream-ef2f43d
Oct 3, 2026
Merged

tournierjc merged 36 commits into
mainfrom
merge/upstream-ef2f43d

Conversation

@tournierjc

@tournierjc tournierjc commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Sync upstream 564e916 (MiniMax Code 0.6.2 + MiniMax-AI#423)

Rolling sync de la branche merge/upstream-ef2f43d : delta cumulé 7b5dee8 (fork main) → 564e916 (upstream tip), 30 commits no-merge amont, dont les vagues de release 0.5.9 → 0.6.2.

Commits intégrés

Conflits et résolutions (merge 564e916 sur la branche)

  • package.json / packages/tui/package.json : identité fork conservée (kinetick-code 0.6.9, pas minimax-code 0.6.2).
  • packages/tui/src/tui/controller/runtime/runtime-event-flow.ts : 3 hunks — conservation des hooks fork (liveTurns Map, beginBackgroundTurn, retainsTranscript, adoption des sessions cachées) + ledger de start amont (fix: sync and release MiniMax Code 0.6.2 MiniMax-AI/minimax-code#423), replay 3-way sur l'adaptation existante 39ee6b6 (identique à l'adapt, vérifié par diff).
  • packages/tui/src/tui/controller/chat-controller.ts : beginBackgroundTurn (hook fork) enregistre le Turn start dans le ledger fix: sync and release MiniMax Code 0.6.2 MiniMax-AI/minimax-code#423 avant le même-turn return — aligné sur le commentaire amont « record before the same-turn return ».
  • runtime-event-flow-stale-run.test.ts : clés dupliquées dans le fixture (rejouet par le merge), dédupliquée.
  • command-flow.test.ts : clé applyPendingModelSelection dupliquée présente sur origin/main depuis 5bba9c7 — supprimée (fix commit dédié 477e139).
  • release/public-source.json : régénéré via node scripts/source-inventory.mjs --write.

Invariants fork vérifiés

  • Telemetry : packages/tui/src/analytics/, cli/telemetry-command.ts, requireTelemetryRunner, docs/telemetry.md, update/service.ts ABSENTS de l'arbre merge. Les deux fichiers *telemetry* restants (subagent-telemetry.ts, pi-mono/core/telemetry.ts) sont présents à l'identique sur origin/main depuis le snapshot initial c59cf53, non touchés par le delta, et sans hôte sortant.
  • Egress guard default-deny intact (gate egress 14/14).
  • 0 symlink node_modules committé (git ls-tree -r HEAD | grep node_modules vide).

Gates locaux (tous verts)

  • typecheck : 0 erreur.
  • check_gates.sh : exit 0 (10 gates, dont fork identity kinetick-code 0.6.9, egress 14/14, session tabs, provider, cost).
  • cibles fix: sync and release MiniMax Code 0.6.2 MiniMax-AI/minimax-code#423 : runtime-event-flow-stale-run + runtime-event-flow + input-flow + visible-presentation = 112/112.
  • tui-app + theme : 425/425.
  • command-flow : 48/48 (après fix dup).
  • build.mjs OK ; node --test test/smoke.test.mjs 20 pass / 0 fail ; test:byok 4 pass / 0 fail.
  • eslint packages/tui/src packages/tui/test --quiet : 0.
  • pnpm verify --profile full : 15 gates PASS sur linux (windows/sandbox/release-package non applicables).

AdhereZ and others added 30 commits September 25, 2026 19:55
Co-authored-by: minimax <adhere@minimaxi.com>
Preserve public privacy defaults and distribution boundaries while porting compaction, Bash timeout, memory output and update-proxy improvements. Record selective provenance without advancing the full source baseline.

Assisted-by: codex-cli reason:public-source-sync-0.5.5
…-AI#360)

* docs: publish feedback and private security contact channels

* docs: correct MiniMax Agent X contact link
…-AI#375)

Include context window and effort controls in the first-run catalog while preserving existing managed snapshots.

Docs-Impact: Existing model selection workflow is unchanged.

Assisted-by: codex-cli reason:m31-flash-fallback-sync
* chore: bump version to 0.5.7

* test: drain stderr before nonzero Bash fixture exit
…x-AI#381)

Port the reviewed shared runtime behavior while retaining standalone composition. Keep conversation leave separate from explicit stop, suppress canceled task delivery, and track append activations through teardown.


Assisted-by: codex-cli reason:selective-runtime-port
Docs-Impact: document stop and session-leave behavior in docs/tui-capabilities.md

Co-authored-by: chenhao <chenhao@minimaxi.com>
…niMax-AI#385)

* feat(examples): add reproducible Pocket Pet demo and refresh onboarding

* feat(examples): polish Pocket Pet interaction and demo
…x-AI#389)

* fix(tui): preserve native scrollback during projection updates

* fix(tui): isolate transient overlays from native scrollback
…I#390)

* fix(tui): prevent idle transcript replay and diff overlay frames

* fix(tui): retain prompt identity and deferred main-buffer geometry
…budget (MiniMax-AI#397)

* test(sandbox): pin the probe PATH instead of inheriting the ambient one

The real sandbox-exec probes resolve their command through PATH, so
inheriting the caller's let any wrapper ahead of /bin decide what `rm`
means. On a machine that has run the agent, that is the recoverable-delete
shim MCode installs into agent shells: `rm` resolves to the shim, the shim
execs mavis-trash, the sandbox denies that trash move as a write outside
the policy under test, and a correct allow-probe exits 1. The suite then
reports a sandbox regression where the sandbox behaved correctly.

Pin all three probe environments to the system binaries the probes
actually use, matching the wrapper-argument test above them. This also
drops the unguarded `process.env.PATH` in wrapProfile, which had no
fallback and could hand a real sandbox spawn an undefined PATH.

Fixes MiniMax-AI#394.

* test(byok): scale the serial BYOK budget by platform

The first case is 30+ serial CLI spawns, each booting the whole runtime,
so its wall-clock cost tracks machine speed rather than the transport it
asserts. The flat 90s budget only held with roughly 1.5x headroom on an
idle machine, so a parallel build, a laptop under load, or a shared CI
runner turned a passing transport into a `testTimeoutFailure` that named a
product failure no assertion had actually observed.

Budget it the way smoke.test.mjs already budgets runtime startup: a base
allowance plus a Windows multiplier for slower process spawn. The test is
not slowed down by a larger ceiling; it only stops failing for reasons
unrelated to what it checks.

Fixes MiniMax-AI#395.
TUI
- Report active root-session background tasks as `background=N` in the
  `[V]` build-mode status line. Bash still owned by its foreground tool
  call is excluded, and the count holds at 1 after a turn settles until a
  fresh task list arrives. The documented minimum width is now 102 columns.

Runtime
- The MiniMax API-key route now shares the official model catalog with the
  managed route; the first-run catalog moves to `minimax-model-catalog.ts`
  with unchanged model definitions.
- Apply byte limits to large media and accumulated history for BYOK requests.
- Send the M3 thinking toggle as a thinking setting rather than a generic
  reasoning effort.
- Allow edit and rewind after an interrupt that left only a background
  reminder in canonical history.
- Read less data when listing session files and navigating long histories.
- Measure token output rate from the time events are observed.
- Add `worktreeRefreshBeforeCreate` (default on) to fetch the selected
  upstream before creating a worktree, and exclude nested roots from fork
  worktree fingerprints.
- Add Ghostty to the external editor catalog.
- Enable the Codex OAuth model settings entry by default.

Prompts
- Cron guidance now lives only in tool definitions; the legacy feature
  template is empty. Memory edits use the `memory` tool's `edit` operation.
- Clarify multimodal tool discovery in the mcode-tools reminder.
…seline (MiniMax-AI#396)

* Revert "fix(tui): stabilize native history and diff overlay frames (MiniMax-AI#390)"

This reverts commit 1e136bf.

* Revert "fix(tui): preserve native scrollback during automatic updates (MiniMax-AI#389)"

This reverts commit 9b9c07b.
* fix: include hidden thinking in TPS timing

* docs: note thinking_start in first token timing comment

* test(windows): allow the NTFS source check to exceed the default timeout

---------

Co-authored-by: hetaoBackend <hetao7@pku.edu.cn>
* fix: omit empty tools on OpenAI compaction requests

* fix: negotiate missing tools with bounded compatibility recovery

* fix: simplify empty tools handling to omit absent definitions
…AI#416)

Regular mode wrote rows into native scrollback as soon as they scrolled
off screen. When such a row later changed (a parallel tool finishing, a
streamed table widening, a list turning loose, a turn growing past the
projection fold, the welcome status badge flipping, or a stopped prompt
gaining its cancelled marker), the renderer cleared scrollback and
replayed the whole session from the welcome logo.

Only final rows now reach native history:

- The transcript reports how many leading rows later updates cannot
  change, including the committed blocks of a streaming Markdown reply.
- The chat layout keeps rows that may still change within one screen
  above the footer, showing their latest rows under a one-line notice
  when they do not fit.
- The regular-mode projection only appends; established turns are not
  re-folded or dropped.
- The welcome banner above a conversation is static; account notices
  that need action appear above the Composer.
- Stopping a run no longer marks its delivered prompt as cancelled; the
  marker stays reserved for prompts returned to the Composer.

To keep long sessions responsive, the transcript drops final rows far
above the screen and the engine rebases its retained state
(takeDiscardedRows) instead of rewriting history.
Port the reviewed 0.6.0 runtime and TUI behavior into the standalone
distribution and bump the release version to 0.6.0.

- Allow /retry inside a /btw side conversation to resend its last message.
- Default to MiniMax-M3.1-Flash-Preview when no model has been selected.
- After an accepted Goal completion, keep the Turn open for one final reply
  that summarizes the result and deliverables; blocked proposals still end
  the Turn.
- Do not retry provider safety refusals, including on BYOK, and classify
  them as content_filter; keep Anthropic refusal details in the error.
- Retry TLS record verification failures before output like other
  transient network errors.
- Keep a post-compaction reminder at the tail of a continuation instead of
  aborting the provider call and recompacting on every retry.
Allow /doctor and /feedback in a /btw side conversation so a failed side
response can be diagnosed or reported without leaving it. Neither command
mutates the parent or side Session. /quit stays blocked in the side view,
because leaving from there aborts only the side Turn and skips side
Session cleanup.

Bump the root and TUI source versions to 0.6.1.
# Conflicts:
#	README.md
#	README_ZH.md
#	docs/demo.md
#	docs/examples.md
#	docs/tui-capabilities.md
#	examples/pocket-pet/README.md
#	examples/pocket-pet/finished/app.js
#	examples/pocket-pet/finished/index.html
#	examples/pocket-pet/starter/index.html
#	package.json
#	packages/agent-modules/system-reminder/src/mcode-tools-master-reminder.ts
#	packages/agent-tools/test/desktop/local-bash-output.test.ts
#	packages/config/src/config.ts
#	packages/config/test/builtin-model-fallback.test.ts
#	packages/tui/package.json
#	packages/tui/src/provider/application.ts
#	packages/tui/src/provider/contract.ts
#	packages/tui/src/tui/controller/runtime/runtime-event-flow.ts
#	packages/tui/src/tui/engine/LOCAL_CHANGES.json
#	packages/tui/src/tui/engine/LOCAL_CHANGES.md
#	packages/tui/src/tui/features/provider/onboarding.ts
#	packages/tui/src/tui/shell/welcome/component.ts
#	packages/tui/src/update/service.ts
#	packages/tui/test/unit/provider-application.test.ts
#	packages/tui/test/unit/tui-app.test.ts
#	packages/tui/test/unit/tui-provider-onboarding.test.ts
#	packages/tui/test/unit/tui-transcript-view.test.ts
#	packages/tui/test/unit/tui/controller/runtime/runtime-event-flow-stale-run.test.ts
#	packages/tui/test/unit/tui/transcript/presentation/literal-text.test.ts
#	packages/tui/test/unit/update-service.test.ts
#	release/public-source.json
#	test/byok.test.mjs
#	test/source-sync.test.mjs
#	test/vitest-suites.json
hermes-agent and others added 4 commits October 1, 2026 20:08
…compact-rail test

Upstream 5683465 (MiniMax-AI#410) changed the 'renders intent and execution as one
compact visual rail' expectation to keep the prompt's ** markers literal
(fork prompt-literal behavior). The three-way merge kept the pre-MiniMax-AI#410
expectation; adopt the MiniMax-AI#410 form.
…-Flash-Preview

Upstream 9150441 (sync 0.6.0) flipped buildPresetEntry's defaultModel to
minimax/MiniMax-M3.1-Flash-Preview; the three-way merge kept the main side
for config.ts and dropped the flip, breaking the MiniMax-AI#421-pinned
model-selection/management suites. Restore the upstream value.
…x-AI#423)

In a /btw side conversation, an empty Escape no longer arms the
double-Escape /edit shortcut or shows its "Press Esc again to edit"
hint, since /edit is unavailable in side conversations. Escape still
interrupts a live side response.

Switching between the side and main views re-adopted the main Session's
live Turn at the switch time, which reset the Running/Loading timer and
shortened the settled Turn duration. A Turn start ledger now records the
earliest observed start (submission, session.start events including
hidden Sessions, and adoption), and both re-adoption and the activity
line use it.

Bump the root and TUI source versions to 0.6.2.
…rt ledger

Record the earliest Turn start across side-session switches so the main
run timer and settled duration stay stable, and ignore double-Escape
/edit while a side conversation is open. Fork packages stay kinetick-code
and @mavis/code at 0.6.9, and multi-tab live turn watchers stay in place.

Co-authored-by: tournierjc <tournierjc@users.noreply.github.com>
@cursor cursor Bot changed the title merge: upstream ef2f43d (sync MiniMax Code 0.6.0/0.6.1, Pocket Pet, M3.1 Flash default) merge: upstream 564e916 (#423 side-session Esc and run timer, on 0.6.0/0.6.1 sync) Oct 2, 2026
@cursor

cursor Bot commented Oct 2, 2026

Copy link
Copy Markdown

The PR description could not be rewritten from this agent (the existing body is not agent-managed). Title is updated. Taken and skipped for the new head are below. Do not merge without JC review.

Head

39ee6b65bb59c95d6ea8d88ae4193962facc78b4 on merge/upstream-ef2f43d.
Adds upstream 564e916 (fix(tui): keep side-session Esc and main run timer consistent, MiniMax-AI#423) on top of the existing sync through ef2f43d.

Taken from 564e916 / MiniMax-AI#423

  • Empty Escape in a /btw side conversation no longer arms double-Escape /edit or the “Press Esc again to edit” hint. Escape still interrupts a live side response.
  • New packages/tui/src/tui/controller/run/turn-start-ledger.ts records the earliest Turn start (submission, session.start including hidden Sessions, and adoption).
  • Re-adoption and the activity line use that start, so switching between the side view and the main Session does not reset the Running/Loading timer or shorten the settled duration.
  • Wiring in app.ts, chat-controller.ts, input-flow.ts, chrome-flow.ts, visible-presentation.ts, and runtime-event-flow.ts, plus the matching unit tests.
  • release/public-source.json regenerated; it adds the ledger file.

Skipped from 564e916

  • Root and TUI version bumps to 0.6.2. Fork stays kinetick-code / @mavis/code at 0.6.9. package.json and packages/tui/package.json are unchanged.
  • No telemetry, analytics, requireTelemetry, or docs/telemetry.md was in this commit, and none was reintroduced.
  • No MiniMax-only branding, release notes, or managed update channel changes were in this commit.

Conflict resolution

runtime-event-flow.ts keeps the fork multi-tab liveTurns map, beginBackgroundTurn for Sessions that are not on screen, and shouldNotifyKcodeTurnComplete. The ledger is applied on that path: hidden session.start events are recorded, and both visible and background adoption use the earliest start. An already-running watcher for the same Turn stays up; only an earlier timestamp replaces its start.

LOCAL_CHANGES.json is the engine/Pi delta log. This commit does not touch those files.

Validation so far

  • Focused Vitest: input-flow, visible-presentation, stale-run, and live-turn files 112/112 PASS. New tui-app timer test PASS.
  • pnpm verify --profile full is running locally on this head. GitHub Actions on 39ee6b6 is the acceptance gate.

@cursor

cursor Bot commented Oct 2, 2026

Copy link
Copy Markdown

Validation on head 39ee6b65bb59c95d6ea8d88ae4193962facc78b4:

  • Local pnpm verify --profile full: 15/15 PASS (Linux). Skipped on this host: test:windows, test:sandbox, test:release-package.
  • GitHub Actions: green. verify (ubuntu-24 and macos-24) success, build success, install matrix success (ubuntu and macos, Node 22.19 / 24.2 / 25 / 26), performance success, source-history-artifact success, changes success, verification success. docs, gate, and publish skipped as expected.

PR remains open. Do not merge without JC review.

# Conflicts:
#	package.json
#	packages/tui/package.json
#	packages/tui/src/tui/controller/runtime/runtime-event-flow.ts
#	packages/tui/test/unit/tui/controller/runtime/runtime-event-flow-stale-run.test.ts
…low mock

The duplicate key dates from the #55/#57 merge on origin/main (5bba9c7): both
sides added the same mock key. vitest transforms tolerate it; ESLint does not.
@tournierjc
tournierjc merged commit b084d3a into main Oct 3, 2026
18 checks passed
@tournierjc
tournierjc deleted the merge/upstream-ef2f43d branch October 3, 2026 18:07
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.

7 participants