Skip to content
This repository was archived by the owner on Jul 30, 2026. It is now read-only.

refactor(tui): unify responsive table layout - #84

Merged
makoMakoGo merged 1 commit into
personal/local-clientsfrom
codex/tui-responsive-table-layout
Jun 27, 2026
Merged

refactor(tui): unify responsive table layout#84
makoMakoGo merged 1 commit into
personal/local-clientsfrom
codex/tui-responsive-table-layout

Conversation

@makoMakoGo

@makoMakoGo makoMakoGo commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep the existing full-width distributed TUI table visual model with Flex::SpaceBetween
  • add a protected select_width to responsive table columns so optional columns cannot force required columns below their readable width
  • use strict priority-prefix optional selection instead of capacity-fitting subset selection
  • make Model and Total/Tokens the only required model usage columns across Models, Workspace Models, and Detail schemas
  • migrate Agents to the same responsive selection model with Agent and Tokens required, and Cost as the highest-priority optional column
  • restore Daily and Period main-table optional priorities to their original prefix order
  • keep context columns atomic measured optionals where selected context columns use their full clamped width
  • remove unused width-growth fields from responsive column declarations
  • centralize fixed-width lookup and make required-column shrinking semantics explicit

Root Cause

The responsive layout rewrite selected optional columns using min_width, then tried to grow required measured columns afterward. Since identity columns had small minimum widths, wide optional columns could be selected while the identity column was left truncated. A later revision protected required columns with select_width, but still used skip-blocked optional selection, which let lower-priority small columns appear before higher-priority wide columns. That changed the original priority-prefix layout into a capacity-fitting subset layout.

Notes

  • required columns are selected first and protected at select_width
  • required columns shrink only toward their declared minimums; if required minimums still exceed the table width, the layout intentionally overflows rather than dropping required columns
  • optional columns are tried by priority, and selection stops at the first optional column that does not fit
  • priority and display order remain separate: high-priority columns keep their original display positions
  • Daily and Period main tables preserve their original with-turn and without-turn optional priority prefixes
  • Agents no longer has is_very_narrow / is_narrow hard-coded column sets
  • Hourly optional priorities are explicit and do not rely on secondary display-order sorting
  • no old narrow hard fallback, required-column sacrifice, or Flex::Start layout is restored

Validation

  • cargo fmt --check
  • cargo test -p tokscale-cli
  • cargo build -p tokscale-cli --release
  • /home/travis/.local/bin/tokscale --version
  • /home/travis/.local/bin/tokscale --no-spinner --help

Summary by CodeRabbit

  • 新功能
    • 多个表格视图采用统一响应式列布局,并根据屏幕宽度自动选择与收缩列;窄屏下更稳定保留关键信息。
  • 改进
    • 列间距统一调整;列宽驱动的截断显示更一致。
    • Turn、Cost/Tokens 的排序提示与列选择规则随布局更合理。
  • 修复
    • 修正窄宽/极窄场景下列顺序、列宽与内容截断不准确的问题。

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dd77e280-403d-45a4-ae3e-fda04c299034

📥 Commits

Reviewing files that changed from the base of the PR and between 7b67e9f and 96ec1a4.

📒 Files selected for processing (7)
  • crates/tokscale-cli/src/tui/ui/agents.rs
  • crates/tokscale-cli/src/tui/ui/daily.rs
  • crates/tokscale-cli/src/tui/ui/hourly.rs
  • crates/tokscale-cli/src/tui/ui/model_usage_layout.rs
  • crates/tokscale-cli/src/tui/ui/models.rs
  • crates/tokscale-cli/src/tui/ui/period.rs
  • crates/tokscale-cli/src/tui/ui/table_layout.rs
🚧 Files skipped from review as they are similar to previous changes (6)
  • crates/tokscale-cli/src/tui/ui/agents.rs
  • crates/tokscale-cli/src/tui/ui/hourly.rs
  • crates/tokscale-cli/src/tui/ui/daily.rs
  • crates/tokscale-cli/src/tui/ui/models.rs
  • crates/tokscale-cli/src/tui/ui/model_usage_layout.rs
  • crates/tokscale-cli/src/tui/ui/period.rs

Walkthrough

多个 TUI 表格改为共享响应式列布局,统一生成列集合、列宽和截断宽度,并移除了旧的手工宽度分配路径;Agents、Daily、Hourly、Models、Period 的渲染与测试也同步更新。

Changes

响应式 TUI 表格布局

Layer / File(s) Summary
共享布局引擎
crates/tokscale-cli/src/tui/ui/table_layout.rs
新增 ResponsiveColumn/ResponsiveTableLayoutresponsive_table_layout,按必选/可选列与宽度收缩规则生成列集合、列宽和 width_for,并更新相关布局测试。
模型使用布局
crates/tokscale-cli/src/tui/ui/model_usage_layout.rs
模型使用率布局按 schema 生成列集与宽度查询,删除 profile 和旧分配路径。
Models 表布局
crates/tokscale-cli/src/tui/ui/models.rs
Models 视图改用 schema 驱动布局,按布局宽度截断 Provider 和 Source,并更新表配置与测试。
Daily 主表布局
crates/tokscale-cli/src/tui/ui/daily.rs
Daily 主表改为响应式列集合并按列宽截断 TopSource 和 TopModel,detail 布局入口切到 ModelUsageLayoutSchema::Detail
Daily Detail 布局
crates/tokscale-cli/src/tui/ui/daily.rs
Daily Detail 改为按布局宽度截断 Provider 和 Source,并更新间距、布局签名与详情测试。
Period 主表布局
crates/tokscale-cli/src/tui/ui/period.rs
Period 主表改为响应式列集合并按列宽截断 Period、TopSource 和 TopModel,detail 布局入口切到 ModelUsageLayoutSchema::Detail
Period Detail 布局
crates/tokscale-cli/src/tui/ui/period.rs
Period Detail 改为按布局宽度截断 Provider 和 Source,并更新间距、布局签名与详情测试。
Agents 表布局
crates/tokscale-cli/src/tui/ui/agents.rs
Agents 表改为按列枚举生成表头和单元格,并用响应式布局计算列宽与排序标记。
Hourly 表布局
crates/tokscale-cli/src/tui/ui/hourly.rs
Hourly 表改为响应式列集合与 Source 截断宽度查询,并更新间距、列保留规则和布局测试。

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related issues

Possibly related PRs

Poem

我是一只小兔,蹦进新格子,
响应式列宽,排得整整齐齐。
Daily、Period、Agents 都换了新衣,
Source 轻轻一缩,消息也不拥挤。
🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.45% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了此次对 TUI 表格布局响应式逻辑的统一重构。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/tui-responsive-table-layout

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codspeed-hq

codspeed-hq Bot commented Jun 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 18 untouched benchmarks


Comparing codex/tui-responsive-table-layout (96ec1a4) with personal/local-clients (c207dcb)

Open in CodSpeed

@makoMakoGo
makoMakoGo force-pushed the codex/tui-responsive-table-layout branch from eebd80d to c150f49 Compare June 26, 2026 15:51

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/tokscale-cli/src/tui/ui/daily.rs`:
- Around line 807-810: Restore the muted theme for the
DailyDetailColumn::Provider cell in the daily table rendering path so it matches
the Source column’s styling. Update the Cell construction in the branch that
formats get_provider_display_name(...) and truncate_display_width(...) to apply
theme_muted after truncation, keeping the visual hierarchy consistent with the
other detail columns.

In `@crates/tokscale-cli/src/tui/ui/period.rs`:
- Around line 588-591: The Provider cell in the Period Detail table is missing
the muted styling, causing it to render with the default foreground while Source
still uses muted. Update the PeriodDetailColumn::Provider branch in the period
table rendering logic to apply the same muted style used by the Source cell,
keeping the visual hierarchy consistent in the Period Detail view.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f8b7e09d-4488-49d3-a394-04a4a84043e7

📥 Commits

Reviewing files that changed from the base of the PR and between c207dcb and c150f49.

📒 Files selected for processing (7)
  • crates/tokscale-cli/src/tui/ui/agents.rs
  • crates/tokscale-cli/src/tui/ui/daily.rs
  • crates/tokscale-cli/src/tui/ui/hourly.rs
  • crates/tokscale-cli/src/tui/ui/model_usage_layout.rs
  • crates/tokscale-cli/src/tui/ui/models.rs
  • crates/tokscale-cli/src/tui/ui/period.rs
  • crates/tokscale-cli/src/tui/ui/table_layout.rs

Comment thread crates/tokscale-cli/src/tui/ui/daily.rs Outdated
Comment thread crates/tokscale-cli/src/tui/ui/period.rs Outdated
@makoMakoGo
makoMakoGo marked this pull request as ready for review June 26, 2026 16:13

@cubic-dev-ai cubic-dev-ai 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.

5 issues found across 7 files

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread crates/tokscale-cli/src/tui/ui/daily.rs
Comment thread crates/tokscale-cli/src/tui/ui/table_layout.rs Outdated
Comment thread crates/tokscale-cli/src/tui/ui/agents.rs
Comment thread crates/tokscale-cli/src/tui/ui/hourly.rs
Comment thread crates/tokscale-cli/src/tui/ui/model_usage_layout.rs Outdated
@makoMakoGo
makoMakoGo marked this pull request as draft June 26, 2026 16:38
@makoMakoGo
makoMakoGo force-pushed the codex/tui-responsive-table-layout branch 4 times, most recently from 8706efe to 8ef9fb1 Compare June 26, 2026 18:04

@makoMakoGo makoMakoGo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

PR 84 re-review(更新意见)

整体:当前 PR 在“视觉布局(SpaceBetween + distributed table)”层已经基本正确,但在“列选择语义一致性”上仍未收敛,导致 Models / Agents 出现行为漂移。


1. 关键问题:仍然存在 subset-selection 行为

当前 responsive_table_layout 依旧是 greedy subset fitting:

  • optional columns 可以跳过
  • 后续低优先级列可能越过高优先级列被选中

这会导致:

  • Input / Provider / Source 出现顺序不稳定
  • 违反 strict priority prefix 语义

建议必须明确收敛为:

  • strict prefix selection
  • optional 遇到第一个放不下即 break
  • 不允许 skip-block 继续尝试后续 optional

2. Agents tab 仍未统一 schema

Agents 当前仍保留三段式分支(very_narrow / narrow / wide):

  • narrow 行为仍是硬编码列集合
  • Tokens / Cost 优先级仍被分支覆盖

这会导致:

  • Agents 与 Models / Detail 行为不一致
  • 同一 layout engine 不同语义

建议:

  • 删除 is_narrow / is_very_narrow 分支
  • 统一 schema-driven layout
  • Tokens 作为 required,Cost 为 highest optional

3. Models tab 行为仍存在“非前缀扩展”现象

当前 observed behavior:

  • Input / Provider / Source 出现顺序非严格 prefix
  • 某些低优先级列可越过高优先级列出现

这说明 selection semantics 仍未统一


设计判断(重要)

当前 PR 仍处于混合模型状态:

✔ layout(SpaceBetween / full width)是正确的
❌ selection(列选择逻辑)仍是 knapsack-like subset model

两者不等价


建议收敛方向

必须统一成单一语义:

  1. strict priority prefix selection(核心)
  2. optional columns 按 priority 顺序尝试
  3. 遇到第一个失败 optional → break
  4. 不允许 skip-block selection

这样才能保证:

  • Models / Agents / Detail 行为一致
  • column order 可预测
  • UI 不出现跨优先级跳变

结论

PR 目前不建议合入。
需要先统一 selection semantics,再谈 layout polish。

@makoMakoGo
makoMakoGo force-pushed the codex/tui-responsive-table-layout branch from 8ef9fb1 to aa3f2c6 Compare June 27, 2026 07:13
@makoMakoGo
makoMakoGo marked this pull request as ready for review June 27, 2026 07:13

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/tokscale-cli/src/tui/ui/period.rs`:
- Around line 180-196: The current responsive setup in PeriodColumn makes the
required set too wide on narrow screens because Period is atomic required and
Cost is also required; update the layout in the period responsive column
definitions to let Period fall back to its minimum readable width when the
required set does not fit, and make Cost an optional lower-priority column so
Period + Total can still fit first. Also adjust the narrow-screen test
assertions around the Period table so they no longer treat Cost as a core
required column, using the existing ResponsiveColumn and PeriodColumn symbols to
locate the affected logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6074422a-8466-4fa2-b8df-7dbc08f4dae6

📥 Commits

Reviewing files that changed from the base of the PR and between c150f49 and aa3f2c6.

📒 Files selected for processing (7)
  • crates/tokscale-cli/src/tui/ui/agents.rs
  • crates/tokscale-cli/src/tui/ui/daily.rs
  • crates/tokscale-cli/src/tui/ui/hourly.rs
  • crates/tokscale-cli/src/tui/ui/model_usage_layout.rs
  • crates/tokscale-cli/src/tui/ui/models.rs
  • crates/tokscale-cli/src/tui/ui/period.rs
  • crates/tokscale-cli/src/tui/ui/table_layout.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • crates/tokscale-cli/src/tui/ui/agents.rs
  • crates/tokscale-cli/src/tui/ui/model_usage_layout.rs
  • crates/tokscale-cli/src/tui/ui/daily.rs

Comment thread crates/tokscale-cli/src/tui/ui/period.rs Outdated

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 7 files

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

@makoMakoGo
makoMakoGo force-pushed the codex/tui-responsive-table-layout branch 2 times, most recently from fcf41d6 to 7b67e9f Compare June 27, 2026 09:35

@coderabbitai coderabbitai 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.

♻️ Duplicate comments (2)
crates/tokscale-cli/src/tui/ui/period.rs (2)

187-203: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

避免窄屏时 required 列本身超出表格宽度。

Period 是 atomic required,Cost 也是 required;当前窄屏测试仍把宽度 30 的布局固定为 19 + 10 + 10,这会在加上列间距前就超过 table_width。让 Period 可收缩到最小可读宽度,并把 Cost 改成最高优先级 optional,才能保住 Period + Total 的核心列集。

建议修复
-        ResponsiveColumn::measured_atomic_required(
+        ResponsiveColumn::measured_required(
             PeriodColumn::Period,
             period_column_order(PeriodColumn::Period),
             PERIOD_MIN_WIDTH,
             period_content_width,
             PERIOD_MAX_WIDTH,
@@
-        ResponsiveColumn::fixed_required(
+        ResponsiveColumn::fixed_optional(
             PeriodColumn::Cost,
+            5,
             period_column_order(PeriodColumn::Cost),
             COST_WIDTH,
         ),

同时更新 Line 946-955 的窄屏断言,不要继续把 Cost 当作核心 required 列。

Also applies to: 944-955

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/tokscale-cli/src/tui/ui/period.rs` around lines 187 - 203, The
narrow-screen layout in PeriodColumn is still treating Cost as required, which
can make the fixed required columns exceed the table width. Update the
ResponsiveColumn setup in period.rs so Period remains atomic but can shrink to
its minimum readable width, and change Cost from fixed_required to the
highest-priority optional column; then adjust the narrow-screen assertions in
the related test block so they no longer expect Cost to be part of the core
required set.

591-594: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Provider 单元格补回 muted 样式。

Source 仍是 muted,但 Provider 现在使用默认前景色,Detail 上下文列的视觉层级不一致。

建议修复
                     PeriodDetailColumn::Provider => Cell::from(truncate_display_width(
                         &get_provider_display_name(&row.provider),
                         table_layout.width_for(PeriodDetailColumn::Provider),
-                    )),
+                    ))
+                    .style(Style::default().fg(theme_muted)),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/tokscale-cli/src/tui/ui/period.rs` around lines 591 - 594, The
PeriodDetailColumn::Provider cell lost its muted styling, so the Detail table
now renders Provider with the default foreground while Source remains muted.
Update the Provider match arm in the period UI rendering logic to apply the same
muted style used by the Source cell, keeping the visual hierarchy consistent
across context columns.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@crates/tokscale-cli/src/tui/ui/period.rs`:
- Around line 187-203: The narrow-screen layout in PeriodColumn is still
treating Cost as required, which can make the fixed required columns exceed the
table width. Update the ResponsiveColumn setup in period.rs so Period remains
atomic but can shrink to its minimum readable width, and change Cost from
fixed_required to the highest-priority optional column; then adjust the
narrow-screen assertions in the related test block so they no longer expect Cost
to be part of the core required set.
- Around line 591-594: The PeriodDetailColumn::Provider cell lost its muted
styling, so the Detail table now renders Provider with the default foreground
while Source remains muted. Update the Provider match arm in the period UI
rendering logic to apply the same muted style used by the Source cell, keeping
the visual hierarchy consistent across context columns.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ea93c1b1-0a3b-4f92-b1aa-4f7ca9452ae7

📥 Commits

Reviewing files that changed from the base of the PR and between aa3f2c6 and 7b67e9f.

📒 Files selected for processing (7)
  • crates/tokscale-cli/src/tui/ui/agents.rs
  • crates/tokscale-cli/src/tui/ui/daily.rs
  • crates/tokscale-cli/src/tui/ui/hourly.rs
  • crates/tokscale-cli/src/tui/ui/model_usage_layout.rs
  • crates/tokscale-cli/src/tui/ui/models.rs
  • crates/tokscale-cli/src/tui/ui/period.rs
  • crates/tokscale-cli/src/tui/ui/table_layout.rs
🚧 Files skipped from review as they are similar to previous changes (6)
  • crates/tokscale-cli/src/tui/ui/hourly.rs
  • crates/tokscale-cli/src/tui/ui/table_layout.rs
  • crates/tokscale-cli/src/tui/ui/models.rs
  • crates/tokscale-cli/src/tui/ui/model_usage_layout.rs
  • crates/tokscale-cli/src/tui/ui/agents.rs
  • crates/tokscale-cli/src/tui/ui/daily.rs

@makoMakoGo

Copy link
Copy Markdown
Owner Author

/juya review

@juya-review-bot juya-review-bot 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.

OpenCodeReview found 1 issue(s).
1 issue(s) could not be attached inline and are summarized below.

crates/tokscale-cli/src/tui/ui/table_layout.rs

This O(W × N) loop decrements widths by 1 each iteration, where W is the total surplus width that needs to be removed. For typical terminal widths (up to ~200+), this means hundreds of iterations, each scanning all columns. Since the goal is to reduce total width to table_width, this can be done in O(N) by computing the required reduction and distributing it proportionally across columns that still have shrinkable surplus.

For example: compute the total surplus (spaced_width(&widths) - table_width), then repeatedly subtract in proportionally largest surpluses — or use a single-pass fair-distribution algorithm. This avoids hundreds of redundant iterations during every TUI render.

Suggested change

Before:

    while spaced_width(&widths) > table_width {
        let Some(index) = columns
            .iter()
            .enumerate()
            .filter(|(index, column)| widths[*index] > column.min_width)
            .max_by_key(|(index, column)| widths[*index] - column.min_width)
            .map(|(index, _)| index)
        else {
            break;
        };

        widths[index] -= 1;
    }

After:

    // Compute surplus once, then distribute the reduction proportionally
    // across columns that still have shrinkable headroom.
    let surplus = spaced_width(&widths).saturating_sub(table_width);
    let mut remaining = surplus;

    while remaining > 0 {
        let shrinkable: Vec<usize> = columns
            .iter()
            .enumerate()
            .filter(|(i, c)| widths[*i] > c.min_width)
            .map(|(i, _)| i)
            .collect();
        if shrinkable.is_empty() {
            break;
        }
        let max_headroom = shrinkable
            .iter()
            .map(|&i| widths[i] - columns[i].min_width)
            .max()
            .unwrap_or(0);
        // Reduce by the largest headroom in one step, distributed across columns
        let step = remaining.min(max_headroom);
        for &i in &shrinkable {
            let headroom = widths[i] - columns[i].min_width;
            let reduction = step.min(headroom);
            widths[i] -= reduction;
            remaining = remaining.saturating_sub(reduction);
        }
    }

@makoMakoGo
makoMakoGo force-pushed the codex/tui-responsive-table-layout branch from 7b67e9f to 96ec1a4 Compare June 27, 2026 11:50
@makoMakoGo

Copy link
Copy Markdown
Owner Author

Review follow-up:

  • restored muted styling for Daily/Period detail Provider context columns
  • changed Period from atomic required to measured required so required-only narrow layouts can shrink toward PERIOD_MIN_WIDTH without dropping core columns
  • kept Cost required by design because Period/Total/Cost are the core Period summary columns
  • left shrink_required_columns_toward_min_widths simple; the reviewed O(W x N) path only runs when required select widths exceed table width, with tiny N and terminal-column-scale W, and the current loop keeps shrink behavior deterministic by reducing the largest remaining headroom
  • removed the now-unused measured_atomic_required constructor

Validation:

  • cargo fmt --check
  • cargo test -p tokscale-cli
  • cargo build -p tokscale-cli --release
  • /home/travis/.local/bin/tokscale --version
  • /home/travis/.local/bin/tokscale --no-spinner --help

@makoMakoGo
makoMakoGo merged commit f91d3e9 into personal/local-clients Jun 27, 2026
8 checks passed
@makoMakoGo
makoMakoGo deleted the codex/tui-responsive-table-layout branch June 27, 2026 13:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant