Skip to content

refactor(tui): fold structure blocks to tags in read mode - #134

Open
Ariestar wants to merge 1 commit into
tui/theme-configfrom
tui/content-mode-unify
Open

refactor(tui): fold structure blocks to tags in read mode#134
Ariestar wants to merge 1 commit into
tui/theme-configfrom
tui/content-mode-unify

Conversation

@Ariestar

@Ariestar Ariestar commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Purpose

Read mode now collapses every structure part to its <:…:>\ tag line (<:tool:Bash call:>, <:thinking:>, …) instead of a plain channel summary (\ ools: Bash x2). Raw mode keeps the complete block. Both modes render the tags with the same gray style — read and raw share styling, not content.

Changes

  • \structured_parts_text\ emits each part's open-marker tag instead of channel summaries; \collapse_structure_markers\ and its dead styling are deleted.
  • Content labels become
    ead\ /
    aw.

Validation

  • \cargo test --workspace\ (332 + 205), clippy -D warnings, \cargo fmt --check\ pass; workspace tests rewritten to assert read shows tags only (payloads dropped) and raw shows full blocks.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 28920bf5-b5a4-438d-b1d6-869c13401a5d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploying sivtr with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9a7622d
Status: ✅  Deploy successful!
Preview URL: https://51768db8.sivtr.pages.dev
Branch Preview URL: https://tui-content-mode-unify.sivtr.pages.dev

View logs

@Ariestar
Ariestar force-pushed the tui/content-mode-unify branch from 6aeeee1 to f64b4cd Compare August 13, 2026 07:18
@Ariestar Ariestar changed the title refactor(tui): drop structure folding, read and raw share full payloads refactor(tui): fold structure blocks to tags in read mode Aug 13, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f64b4cd7eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tui/content/text.rs
if part.kind().is_structure() {
run.push(part);
continue;
chunks.push(structure_fold_label(part));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 在变更日志中记录读取模式的行为变化

此处把读取模式从按频道汇总改为逐项显示结构标签,同时提交还修改了用户可见的 read/raw 界面文案,但变更未写入 CHANGELOG.md 或版本变更日志,后续发布说明将遗漏这项可见行为变化;请补充相应条目。

AGENTS.md reference: AGENTS.md:L149-L150

Useful? React with 👍 / 👎.

Read mode now collapses every structure part to its <:...:> tag line
(<:tool:Bash call:>, <:thinking:>, ...) instead of a plain channel
summary (tools: Bash x2) and instead of the full payload. Raw mode keeps
the complete block. Both modes render the tags with the same gray style.

Deletes the channel-summary fold machinery and its dead styling; content
labels become read/raw.
@Ariestar
Ariestar force-pushed the tui/content-mode-unify branch from f64b4cd to 9a7622d Compare August 14, 2026 09:47
@Ariestar
Ariestar marked this pull request as ready for review August 14, 2026 09:48
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.

2 participants