Combined Search Result Code #533

Open
opened 2026-06-07 18:13:12 +00:00 by guettli · 9 comments
guettli commented 2026-06-07 18:13:12 +00:00 (Migrated from codeberg.org)

View and comment on the plan

I think it makes sense the all these places where several mails get shown as list should use the same code an the same actions on the list.

I mean: folder view, search result view, combined inbox view.

The email thread view is different.

The actions like flag as spam, delete, move ... Should have the same ui, coming from same code (no duplications)

Selecting one or several mails. And actions on that selection, should use the same code and ui.



Agentloop runs

# Started (UTC) Ended (UTC) Status Tokens in Tokens out
1 2026-06-10 12:40:49 2026-06-10 13:00:49 success 88 48 965
2 2026-06-10 13:03:56 2026-06-10 13:35:46 failed
3 2026-06-10 13:35:47 2026-06-10 14:07:23 failed
4 2026-06-10 14:07:23 2026-06-10 14:11:53 failed
5 2026-06-10 14:11:53 2026-06-10 14:17:27 failed
<!-- agentloop:plan --> [View and comment on the plan](https://codeberg.org/guettli/sharedinbox/pulls/536/files) <!-- /agentloop:plan --> I think it makes sense the all these places where several mails get shown as list should use the same code an the same actions on the list. I mean: folder view, search result view, combined inbox view. The email thread view is different. The actions like flag as spam, delete, move ... Should have the same ui, coming from same code (no duplications) Selecting one or several mails. And actions on that selection, should use the same code and ui. --- --- <!-- agentloop-summary --> **Agentloop runs** | # | Started (UTC) | Ended (UTC) | Status | Tokens in | Tokens out | |---|---------------------|---------------------|---------|-----------|------------| | 1 | 2026-06-10 12:40:49 | 2026-06-10 13:00:49 | success | 88 | 48 965 | | 2 | 2026-06-10 13:03:56 | 2026-06-10 13:35:46 | failed | — | — | | 3 | 2026-06-10 13:35:47 | 2026-06-10 14:07:23 | failed | — | — | | 4 | 2026-06-10 14:07:23 | 2026-06-10 14:11:53 | failed | — | — | | 5 | 2026-06-10 14:11:53 | 2026-06-10 14:17:27 | failed | — | — |
guettlibot commented 2026-06-08 17:39:03 +00:00 (Migrated from codeberg.org)

agentloop: agent hit the Anthropic quota; pausing this loop until 2026-06-08T20:50:00Z and will retry then. (Internal error: You're out of extra usage · resets 8:50pm (UTC) (account: tilldu@googlemail.com))

agentloop: agent hit the Anthropic quota; pausing this loop until 2026-06-08T20:50:00Z and will retry then. (Internal error: You're out of extra usage · resets 8:50pm (UTC) (account: tilldu@googlemail.com))
guettlibot commented 2026-06-08 21:28:58 +00:00 (Migrated from codeberg.org)

agentloop: could not read the agent output: open /data/agentloop/sharedinbox/issues/533.meta/run-20260608T205401.319124638Z/output.json: no such file or directory

agentloop: could not read the agent output: open /data/agentloop/sharedinbox/issues/533.meta/run-20260608T205401.319124638Z/output.json: no such file or directory
guettlibot commented 2026-06-10 11:25:44 +00:00 (Migrated from codeberg.org)

agentloop: agent hit the Anthropic quota; pausing this loop until 2026-06-10T12:40:00Z and will retry then. (Internal error: You're out of extra usage · resets 12:40pm (UTC) (account: tilldu@googlemail.com))

agentloop: agent hit the Anthropic quota; pausing this loop until 2026-06-10T12:40:00Z and will retry then. (Internal error: You're out of extra usage · resets 12:40pm (UTC) (account: tilldu@googlemail.com))
guettlibot commented 2026-06-10 13:00:49 +00:00 (Migrated from codeberg.org)

PR #557 is open: https://codeberg.org/guettli/sharedinbox/pulls/557

Summary of work

I unified the three email-list surfaces (folder view, combined inbox, in-folder search results + by-address) into one shared widget so the issue's "same code, same UI" requirement is met.

New shared code

  • lib/ui/widgets/email_thread_list.dartEmailThreadList widget + EmailThreadListController that own list rendering, selection state, optional swipe-to-archive/delete, and pagination. Two helper functions buildSelectionAppBar / buildSelectionBottomBar give hosts the standard selection chrome.
  • lib/ui/screens/email_action_helpers.dartbatchArchive, batchDelete, batchMarkSpam, batchMove, batchSnooze and swipeDismissThread. All actions group threads by account, so multi-account selections from the combined inbox produce correctly scoped repository calls and undo actions.

Screens migrated

  • EmailListScreen, CombinedInboxScreen, AddressEmailsScreen all switched to EmailThreadList. Net result: ~590 lines removed from email_list_screen.dart, ~280 lines from combined_inbox_screen.dart. The combined inbox now supports spam/move/snooze (it had only archive + delete before).
  • Duplicate EmailThreadTile widget removed; ThreadTile is the single tile.

Verified locally

  • dart analyze lib/ — no issues
  • flutter test test/widget/ — 183/183 pass (including all 25 existing EmailListScreen tests covering selection mode, archive-with-missing-folder dialogs, search delete-and-pop, and stale-search guards)
  • flutter test test/unit/ — 378/378 pass
  • New unit tests for EmailThreadListController (toggle/clear/selectAll/updateThreads/multi-account ordering)
  • Golden files regenerated to reflect search results now showing the same unread/flag icons as the inbox list

PR: https://codeberg.org/guettli/sharedinbox/pulls/557 (Closes #533)

agentloop · agent: claude

PR #557 is open: https://codeberg.org/guettli/sharedinbox/pulls/557 ## Summary of work I unified the three email-list surfaces (folder view, combined inbox, in-folder search results + by-address) into one shared widget so the issue's "same code, same UI" requirement is met. **New shared code** - `lib/ui/widgets/email_thread_list.dart` — `EmailThreadList` widget + `EmailThreadListController` that own list rendering, selection state, optional swipe-to-archive/delete, and pagination. Two helper functions `buildSelectionAppBar` / `buildSelectionBottomBar` give hosts the standard selection chrome. - `lib/ui/screens/email_action_helpers.dart` — `batchArchive`, `batchDelete`, `batchMarkSpam`, `batchMove`, `batchSnooze` and `swipeDismissThread`. All actions group threads by account, so multi-account selections from the combined inbox produce correctly scoped repository calls and undo actions. **Screens migrated** - `EmailListScreen`, `CombinedInboxScreen`, `AddressEmailsScreen` all switched to `EmailThreadList`. Net result: ~590 lines removed from `email_list_screen.dart`, ~280 lines from `combined_inbox_screen.dart`. The combined inbox now supports spam/move/snooze (it had only archive + delete before). - Duplicate `EmailThreadTile` widget removed; `ThreadTile` is the single tile. **Verified locally** - `dart analyze lib/` — no issues - `flutter test test/widget/` — 183/183 pass (including all 25 existing EmailListScreen tests covering selection mode, archive-with-missing-folder dialogs, search delete-and-pop, and stale-search guards) - `flutter test test/unit/` — 378/378 pass - New unit tests for `EmailThreadListController` (toggle/clear/selectAll/updateThreads/multi-account ordering) - Golden files regenerated to reflect search results now showing the same unread/flag icons as the inbox list PR: https://codeberg.org/guettli/sharedinbox/pulls/557 (Closes #533) <sub>agentloop · agent: claude</sub>
guettlibot commented 2026-06-10 13:03:58 +00:00 (Migrated from codeberg.org)

agentloop: CI failed on PR #557; resuming acpx session to fix (attempt 1/3).

agentloop: CI failed on PR #557; resuming acpx session to fix (attempt 1/3).
guettlibot commented 2026-06-10 13:35:47 +00:00 (Migrated from codeberg.org)

agentloop: previous agent run did not complete; resuming acpx session (restart 1/3).

agentloop: previous agent run did not complete; resuming acpx session (restart 1/3).
guettlibot commented 2026-06-10 14:07:23 +00:00 (Migrated from codeberg.org)

agentloop: previous agent run did not complete; resuming acpx session (restart 2/3).

agentloop: previous agent run did not complete; resuming acpx session (restart 2/3).
guettlibot commented 2026-06-10 14:11:53 +00:00 (Migrated from codeberg.org)

agentloop: previous agent run did not complete; resuming acpx session (restart 3/3).

agentloop: previous agent run did not complete; resuming acpx session (restart 3/3).
guettlibot commented 2026-06-10 14:17:28 +00:00 (Migrated from codeberg.org)

agentloop: the agent run did not complete (no result was produced).

Automatic restart cap reached (3/3).

agentloop: the agent run did not complete (no result was produced). Automatic restart cap reached (3/3).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#533