fix(list): 🐛 move cloud icon to model column#51
Conversation
There was a problem hiding this comment.
Summary
This PR correctly moves the cloud-task indicator from the File column to the Model column and updates layout so icon/text are vertically aligned. The added renderer test validates the intended behavior and catches regressions in column placement. Overall this looks good and is ready to merge.
Important
src/renderer/pages/__tests__/List.test.tsx:445— Brittle test coupling to column order: The assertions usecells[0]andcells[1], which will break if table column order changes (even if behavior remains correct). Prefer selecting the specific File/Model cells by column class/data attribute or matching cell content first, then asserting cloud icon presence/absence in those identified cells.
Praise
src/renderer/pages/List.tsx:540— Good UI alignment fix with flex container: Usingdisplay: flex+alignItems: centercleanly solves vertical alignment between model text and cloud icon.src/renderer/pages/List.tsx:552— Handled truncation with icon coexistence: Reducing text max width when provider is cloud avoids overlap and preserves icon visibility for long model names.src/renderer/pages/__tests__/List.test.tsx:413— Targeted regression test added: The new test directly verifies the icon moved to the correct column and is absent from the previous one, which is exactly the right scope for this bug fix.
There was a problem hiding this comment.
Summary
This PR primarily moves the cloud-task indicator from the File column to the Model column and adds a renderer test to validate that behavior. It also includes an additional status-tooltip change to surface failure reasons for both local and cloud tasks. Overall this looks solid and close to merge-ready, but there is one correctness issue in the new test that can make it flaky.
Important
src/renderer/pages/__tests__/List.test.tsx:442— Test relies on hardcoded column indexes:
The assertions usecells[0]andcells[1]to identify File vs Model columns. This is brittle if columns are reordered, hidden, or responsive behavior changes, causing false failures.
Suggestion: locate the target cells by column semantics instead of index (e.g., find header index by textcolumns.file/columns.model, then assert within that index; or query within row for model text container and ensure cloud icon is inside it).
Praise
-
src/renderer/pages/List.tsx:537— Good UI alignment fix with flex container:
Usingdisplay: flex+alignItems: centerin the model cell is a clean way to keep text and icon aligned consistently. -
src/renderer/pages/List.tsx:586— Improved failure tooltip handling across task types:
The fallback chain forerror/error_message/descriptionmakes failure reasons more robust, especially when backend payloads differ. -
src/renderer/utils/cloudTaskMapper.ts:65andsrc/shared/types/cloud-api.ts:122— Type contract and mapper updated together:
Addingdescriptionanderror_messagein shared API types and mapping them through prevents unsafe access and keeps renderer logic type-safe.
Summary
Test Plan
npm run test:renderer -- src/renderer/pages/__tests__/List.test.tsx🤖 Generated with Codex Cli