文件最后提交记录最后更新时间
fix(tui): 修正含 Tab 缩进的粘贴文本输入光标错位 输入框对 Tab 用了两套不一致的列宽模型:渲染端 push_str_cells 把每个 \t 画成 SOFT_TAB_WIDTH(4) 个空格单元,而光标定位端 wrap_with_cursor 用 cluster_width('\t')==0 计列。于是每个 Tab 缩进的行,光标会比真实插入点 左偏 4×Tab数 列——粘贴 IDE 的 Tab 缩进代码(方法体两级=8 列)时光标左偏 8 列,与实际输入位置不符。仅粘贴代码会触发,键入不会插入字面 \t(Tab 绑定 补全)。 修复:wrap_with_cursor 把 \t 按 SOFT_TAB_WIDTH 计列,与渲染端一致; SOFT_TAB_WIDTH 提为 pub(crate) 作单一来源。新增回归测试。 来源 Issue: https://atomgit.com/atomgit_atomcode/atomcode/issues/528 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> 3 天前
refactor(tuix): clean up alt_screen references in event_loop and trait docs After Task 6.1 deleted alt_screen.rs, the rest of the codebase still carried doc-comments and one ATOMCODE_JEDITERM_FALLBACK banner that referenced the long-gone second renderer. Reword the comments to describe only the retained renderer; delete the now-dead JediTerm banner (lib.rs no longer sets the env var that gates it). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 9 天前
feat(tuix): render \$ skills menu with bare names (MenuKind::Skill) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> 2 天前
fix(tui): 经典 conhost resize 闪退——改用 ED2 清屏避开崩溃 Windows 经典控制台 conhost(10.0.19041) 在窗口拖动 resize 时会 fastfail (0xc0000409),整个终端窗口直接消失。根因:on_resize 用逐行 CUP+EL 擦除整屏 (2×rows 条序列),在 conhost 缓冲区 resize 中途踩中其 VT 处理 bug。 新增 TerminalCaps.legacy_conhost(is_windows 且无 WT_SESSION/TERM_PROGRAM), 在该宿主下 resize 改发单条 ED2(\x1b[2J\x1b[H) 清屏,conhost 能稳定处理; 其它终端(mac/Linux/iTerm2/Windows Terminal)维持原逐行路径不变。附检测单测。 注:conhost 自身 bug 改不了,只能让 atomcode 不触发它;本修复移除最可能的 触发点(整屏擦除 burst),需在 Windows 经典控制台实测确认。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> 2 天前
fix(tuix): flip QR default to Dense1x2, make Braille opt-in Braille (U+2800-U+28FF) is Unicode-Ambiguous width. Terminals that default ambiguous-width to double (notably iTerm2 with the "Treat ambiguous-width characters as double width" preference, which is on by default in many profiles) render every braille glyph at 2 cells, stretching the QR horizontally and breaking scanner aspect tolerance. Block elements (U+2580-U+259F) are Unicode-Neutral width — no terminal renders them at double width — so Dense1x2 stays scannable under any configuration. Trade off ~4x area for universal compatibility. ATOMCODE_QR_BRAILLE=1 still selects the compact form for users on terminals that render braille at single cell width. The prior ATOMCODE_QR_DENSE env var is dropped since Dense1x2 is the default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 1 个月前
chore(tui): on_resize 增加 RSZ 阶段诊断日志(定位 conhost 闪退) ED2 修复后仍闪退。在 on_resize 各阶段「写控制台之前」打 RSZ trace (enter/wipe/body/paint/done),并打印 legacy_conhost 标志与新旧尺寸。 因为是在把字节发给 conhost 之前记录,即便 conhost 当场 fastfail、 trace 文件里仍会留下「最后一个阶段」=触发崩溃的那步,并能确认 ED2 安全路径到底有没有生效。仅 ATOMCODE_TUIX_LOG 开启时有开销。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> 2 天前
fix(tuix): sentinel-fill invalidated prev_cells so width-mismatch can't leak orphans Defense-in-depth follow-up to the win10+pwsh7+zh_CN char-doubling fix. That fix (commit 6d950270) routed width lookups through width_cjk so the model matches conhost's East Asian Ambiguous interpretation. This makes the renderer survive future width-mismatch surprises even when detection misses (English-Windows + CJK content / WT vs conhost width divergence / new ambiguous codepoints not yet covered by unicode-width). The vulnerability: invalidate_rows_from filled prev_cells with Cell::blank() (space, default style, width 1). The follow-up cell-diff compared prev=blank to next=blank for every space cell and emitted no patch — leaving direct-write's stale glyphs visible at any column where the two writes' width models disagreed. Spaces are exactly the columns where the orphan leaks were most visible (char-doubled into the gap). Fix: introduce Cell::sentinel (ch:U+FFFF, Unicode-reserved non-character, never produced by push_str_cells*) and use it in all three invalidate paths (invalidate, invalidate_rows_from, shift_prev_up). Every cell in the next frame now differs from the sentinel, so serialize_patches re-emits every column in the invalidated region — including the blanks that previously fell through as "diff sees no change". Width disagreements degrade to "one glyph in one cell looks wrong" instead of "every space gets the previous char". Architecturally this is the same workaround terminal.clear() does inside ratatui's resize handler (see DeepSeek-TUI ui.rs:1486 comment about #65 / "diff renderer skipping cells that match a stale back buffer") — applied at every invalidate boundary rather than just resize. Cost: ~14 B/iter on the streaming benchmark (the footer's trailing spaces now patch every frame instead of staying suppressed). Streaming byte-cost budget raised 250 → 300 to absorb this; ratio is small enough the user can't perceive it even on a slow SSH link. Pre-existing skills_sub_mode_* failures are unrelated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 7 天前
fix(tuix/theme): split MUTED into light/dark variants so dark mode reads Palette::MUTED was Color::DarkGrey (SGR 90 "bright black") for both themes. On Warp / iTerm2 / Mac Terminal dark profiles, SGR 90 maps to roughly #3F3F3F — about 3:1 contrast against a typical dark background. Tool-batch child rows under a parallel header (└ WebFetch(https://...), attachment markers, status hints, etc.) used Role::Muted and rendered nearly invisible (user screenshot from Warp dark, atomcode v4.22). Light-mode contrast is fine the same way (SGR 90 on white lands at ~5:1), so the fix is mode-aware: light → MUTED_LIGHT = DarkGrey (SGR 90, dark gray on white) dark → MUTED_DARK = White (SGR 37, light gray on dark, ~8-10:1) muted_for_current_theme() reads highlight::theme::is_light_for_render — the same theme switch the syntect / markdown layers already track — so the role lookup tracks live theme changes without restart. Palette::MUTED stays as a back-compat alias for MUTED_LIGHT so any older direct reference keeps compiling. Both Role::Muted and Role::AccentDim now route through the theme-aware helper. Tests: - muted_switches_with_theme: pin Muted+AccentDim swing between MUTED_LIGHT (90) and MUTED_DARK (37) on set_theme_mode toggle. - back_compat_muted_alias_is_light_variant: pin the bare constant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 14 天前
refactor(tuix): remove /scrollbar command + scrollbar feature Drops the user-facing /scrollbar slash command and the entire right-edge-scrollbar feature it gated: - delete render/scrollbar.rs (compute module) and render/ui_state.rs (ui-state.toml persistence; show_scrollbar was its only field) - delete RetainedRenderer::show_scrollbar, toggle_scrollbar, effective_body_width (inlined to screen.width()) and the repaint_body_region helper that only toggle_scrollbar called - drop AckOp::ToggleScrollbar wire variant + worker proxy and the Renderer trait default impl - unregister from BUILTIN_COMMANDS, cmd_desc_i18n, and delete the dedicated locale-coverage test; drop the dispatch arm in event_loop::commands - drop Msg::CmdDescScrollbar / ScrollbarOn / ScrollbarOff and the /scrollbar line in KeybindingsHelp (zh + en bodies) - drop serial_test dev-dep (only used by deleted ui_state tests) Site docs roll back the additions from 91dc4e2e: /scrollbar rows in keybindings + slash-commands, and the "UI preferences / ui-state.toml" section in configuration (all zh + en). cargo check -p atomcode-tuix -p atomcode-core clean. The three pre-existing skills_sub_mode_* test failures predate this change (verified on the parent commit). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 8 天前