Skip to content

fix(app): make Downloads table dividers resize predictably - #542

Merged
linroid merged 2 commits into
mainfrom
fix/table-column-resize
Oct 13, 2026
Merged

linroid merged 2 commits into
mainfrom
fix/table-column-resize

Conversation

@linroid

@linroid linroid commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Problems

  1. Dragging a column divider could jump or resize the wrong column. Header cells were created by position, so when a widened column made TableLayout.fit hide another column, the columns after it moved down an index and the drag in progress ended up driving a different column.
  2. Dragging a divider moved the columns to its left: the divider widened the column after it, and Name and every earlier column shifted.
  3. Widening columns on a wide window, then shrinking the window, hid the rightmost columns, because dragged widths were kept as they were and fit hid whole columns to make room.

Changes

  • Header cells are keyed by column, so a drag stays on its column.
  • Each divider now resizes the column before it (Name for the first one), and the columns after it keep their widths and follow the divider. The last column stretches to fill the table's end, and the drag stops once the last column is back at its own width (TableLayout.arrange, withDivider, TableGeometry).
  • Name's width is saved once dragged (name:<width> in the encoded layout; older versions skip it as an unknown id). Reset columns clears it.
  • As the table narrows, the last column's extra width goes first, then Name's. Next, widened columns give back their extra width, each in proportion, down to their default width or what their header needs. Only after that do columns hide, in the same order as before.
  • Widths are rounded to whole dp, as they are saved, so the divider no longer jumps when a drag ends.
  • widthDragHandle takes startWidens; the inspector's handle is unchanged.

Testing

  • New TableColumnsTest cases cover shrinking before hiding, the last column stretching, dividers moving the following columns, the drag limit and name round-tripping through encode/decode.
  • ./gradlew :app:shared:jvmTest passes.

No before/after snapshots: what changed is drag and resize behavior, and the default table renders the same.

…hers

Header cells were created by index, so when a widened column made another
column hide, the drag in progress moved to a different column. Key the
cells by column, cap a drag at the room left before Name reaches its
minimum, and round widths to whole dp as they are saved, so the divider no
longer jumps on release.
…olumns on narrowing

A divider now resizes the column before it, Name included, and the columns
after it follow; the last column stretches to the table's end. Name's width
is saved once dragged. When the table narrows, widened columns give their
extra width back before any column hides.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T15:07:38.917668Z 7124d4d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 13, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@linroid
linroid merged commit bafc86e into main Oct 13, 2026
11 of 12 checks passed
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.

1 participant