Repository navigation
feat(tui): confirm before the prompt editor's Discard button closes it - #120
Merged
openjiuwen-release-bot[bot] merged 1 commit intoOct 25, 2026
Conversation
The prompt editor's Discard button now asks "Discard prompt?" whenever the editor holds text, changed or not. Discard closes the editor without committing. Cancel, Esc or a click outside returns to the editor with its text, cursor and undo history as they were, and clears an armed Esc. An empty editor still closes at once. Esc, Esc again and Vim's ZQ/:q! are unchanged. The button now uses the error style instead of the warning style. Confirmation dialogs now lay out before their first frame: on mount they size their width, button row (stacked when narrow) and scrolling body from the app's size, instead of one refresh later. A dialog no longer paints once at another width and then jumps, and task previews show from the first frame.
Contributor
|
head_sha: 变更摘要本 PR 主要调整 TUI 中提示词编辑器 主要改动
|
Contributor
|
head_sha: 代码审查✅ 未发现问题 |
Contributor
openjiuwen-release-bot
Bot
merged commit Oct 25, 2026
c361b99
into
openJiuwen-ai:main
18 checks passed
Contributor
|
🤖 This pull request has been merged, and the target branch is up to date. |
openjiuwen-release-bot Bot
pushed a commit
that referenced
this pull request
Oct 25, 2026
[mirror] #120: feat(tui): confirm before the prompt editor's Discard button closes it Created-by: openjiuwen-sync Commit-by: Jiaqi (0x7c13) Liu Merged-by: Ox7c13 Description: Paired: [GitHub #120](#120) ↔ [GitCode !87](https://gitcode.com/openJiuwen/iCode/merge_requests/87) <!-- bot1-mirror-meta --> github_pr: 120 head_repo: 0x7c13/iCode head_ref: dev/0x7c13/editor-discard-confirm head_sha: e10d4ff base_repo: openJiuwen-ai/iCode base_ref: main github_repo: openJiuwen-ai/iCode base_branch: main base_sha: fd3cbcc github_user: 0x7c13 <!-- /bot1-mirror-meta --> GitHub PR mirror for CodeArts CI. <!-- bot1-source-body --> ## Summary **The prompt editor's Discard button asks before it closes the editor.** - Whenever the editor holds text, changed or not, Discard opens a "Discard prompt?" confirmation ("Close the editor without committing this content?"), translated for zh-Hans. - **Discard** closes the editor without committing, as the button did before. The chat draft stays as it was. - **Cancel**, Esc or a click outside returns to the editor with its text, cursor and undo history as they were, and clears an armed Esc ("Esc again discards"). - An empty editor still closes at once. Esc, Esc again, and Vim's `ZQ`/`:q!` are unchanged. - The Discard button now uses the `error` variant instead of `warning`. **Confirmation dialogs are laid out before their first frame.** - `ConfirmDialog.on_mount` now sets the width, the button row (stacked when narrow) and the scrolling body's height from `app.size`. Before, `_size_dialog` ran one refresh later, so the first frame could show the dialog at another width, its buttons below the screen, or empty task previews. - Later resizes and locale changes use the same width rule (`_dialog_width`). - `on_mount` returns early when the app is no longer running or the dialog is closing. ## Test plan - [x] **New tests:** - `test_confirm_layout.py`: every painted frame of the editor's confirmation (en and zh-Hans, four terminal sizes) and of six confirm/notice dialog shapes has the final width, height and button regions. - `test_editor_dialog.py`: the confirmation for unchanged and whitespace-only text in every keymap; Cancel by button, Esc and backdrop keeps the text, cursor and undo history; an empty editor closes without confirmation; the confirmation follows the app locale and a live locale switch. - [x] **Updated tests:** - Tests that clicked Discard now also confirm. - The held-refresh tests in `test_workflow_notices.py` and `test_background_task_modal.py` now expect the final layout and filled previews before deferred callbacks run, and no change after them. - The populated-transcript overlay test now also opens and closes the confirmation with its no-restyle, no-recompose and no-relayout spies on the main screen. - [x] Tests pass locally. - [x] **Gates:** `ruff check`, `ruff format --check`, `ty check` (linux, darwin, win32) and `scripts/i18n.py check`. No docs change: the guide doesn't describe the editor's Discard button. <!-- /bot1-source-body --> See merge request: openJiuwen/iCode!87
This was referenced Oct 25, 2026
openjiuwen-release-bot Bot
pushed a commit
that referenced
this pull request
Oct 26, 2026
[mirror] #124: chore(release): bump version to 0.32.0 Created-by: openjiuwen-sync Commit-by: Jiaqi (0x7c13) Liu Merged-by: Ox7c13 Description: Paired: [GitHub #124](#124) ↔ [GitCode !91](https://gitcode.com/openJiuwen/iCode/merge_requests/91) <!-- bot1-mirror-meta --> github_pr: 124 head_repo: 0x7c13/iCode head_ref: dev/release-0.32.0 head_sha: c9d1882 base_repo: openJiuwen-ai/iCode base_ref: main github_repo: openJiuwen-ai/iCode base_branch: main base_sha: e225cb1 github_user: 0x7c13 <!-- /bot1-mirror-meta --> GitHub PR mirror for CodeArts CI. <!-- bot1-source-body --> Bump iCode to 0.32.0 so a release is cut from current `main`. ## Changes - `pyproject.toml` and `uv.lock`: the package version moves from 0.31.0 to 0.32.0. - i18n catalogs (`locales/chrys.pot`, `locales/zh-Hans/LC_MESSAGES/chrys.po`, the compiled `chrys.mo`): the `Project-Id-Version` header now says 0.32.0. No message changes. ## Release Merging this changes the version in `pyproject.toml` on `main`, so `tag-release.yml` creates the `v0.32.0` tag and starts `cd.yml` for that tag. This is the first release whose Linux offline binaries bundle Pillow 13.0.0, from the glibc 2.17 wheels published as `pillow-13.0.0-manylinux2014.1` (#122, #123). ## Included since 0.31.0 - #123 Pillow 13.0.0 and pypdf 6.21.2 (pypdf security fixes); the Linux offline binaries take the matching glibc 2.17 Pillow wheels - #122 the manylinux2014 Pillow wheel workflow builds 13.0.0 on patched build images, with every source archive pinned by SHA-256 (build-only); hook indicator tests stabilized - #121 completed turns fold into activity sections; the docs show how to request readable Claude thinking summaries - #120 the prompt editor asks for confirmation before its Discard button closes it - #111 a sidebar Hooks tab lists every hook run, and each run is recorded once - GitCode !85 the main chat shows the model's thinking as it streams; a resumed session replays it folded, and `/fold` folds it too - GitCode !84 the chat follows new content only while you are at the bottom - GitCode !83 a hook run log cut to size keeps file paths that are not valid UTF-8 intact - GitCode !82 faster startup: a loading screen with the logo paints before the main screen and agent load, and F12 works again once the agent is ready ## Verification - `uv lock --check` passes. - `scripts/i18n.py extract/update/compile/check` runs clean, and a second run changes nothing. - Tests were not run locally; CI covers them. <!-- /bot1-source-body --> See merge request: openJiuwen/iCode!91
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.
Paired: GitHub #120 ↔ GitCode !87
Summary
The prompt editor's Discard button asks before it closes the editor.
ZQ/:q!are unchanged.errorvariant instead ofwarning.Confirmation dialogs are laid out before their first frame.
ConfirmDialog.on_mountnow sets the width, the button row (stacked when narrow) and the scrolling body's height fromapp.size. Before,_size_dialogran one refresh later, so the first frame could show the dialog at another width, its buttons below the screen, or empty task previews._dialog_width).on_mountreturns early when the app is no longer running or the dialog is closing.Test plan
test_confirm_layout.py: every painted frame of the editor's confirmation (en and zh-Hans, four terminal sizes) and of six confirm/notice dialog shapes has the final width, height and button regions.test_editor_dialog.py: the confirmation for unchanged and whitespace-only text in every keymap; Cancel by button, Esc and backdrop keeps the text, cursor and undo history; an empty editor closes without confirmation; the confirmation follows the app locale and a live locale switch.test_workflow_notices.pyandtest_background_task_modal.pynow expect the final layout and filled previews before deferred callbacks run, and no change after them.ruff check,ruff format --check,ty check(linux, darwin, win32) andscripts/i18n.py check.No docs change: the guide doesn't describe the editor's Discard button.