Skip to content

Undo a link you just made; signpost manage mode#3565

Merged
matthiasn merged 1 commit into
mainfrom
feat/task-links-followup
Jul 24, 2026
Merged

Undo a link you just made; signpost manage mode#3565
matthiasn merged 1 commit into
mainfrom
feat/task-links-followup

Conversation

@matthiasn

Copy link
Copy Markdown
Owner

Follow-up to #3563, closing out the design-review backlog that PR deliberately
deferred. Tracked as lotti3-t4m.8.

Undo a link you just made

The highest-value item left over. Picking a candidate row commits on that
single tap — deliberately, since the speed is the point of the flow — but there
was no recovery: a mis-tap, or the right task under the wrong relationship,
silently persisted a real edge whose only removal path was the card's manage
mode.

This does not add a confirm step. It adds an undo:

  • On success, a message names what was actually written — Blocks: Draft crew rotation schedule — rather than a generic "linked".
  • Undo removes exactly the (fromId, toId, type) triple just created, so it
    can only take back the edge the message is about, never another relationship
    the same pair also holds (which Redesign task relationship links: one directed choice, editable in place #3563 made possible).
  • A rejected link (cycle guard) shows the rejection and offers no undo.

Two experts and two personas raised this across review rounds 3-6; the
low-vision and novice personas both scored it an outright blocker, and it was
the largest single contributor to the gap between the panel's 7.17/7.0 and its
8/10 bar.

Manage mode says it is on

Manage mode was visible only as two icons appearing per row, and the way out
was the same unlabelled overflow menu it was entered from. The header now
swaps its link action for an inline Done while the mode is active, and the
overflow offers "Manage links…" only as a way in — so the menu item stops
being a second control for the same state.

Smaller items from the same backlog

  • The picker search field autofocuses on desktop-width windows only. On a
    phone it would raise the keyboard over the very results it filters.
  • The linked-tasks overflow menu uses the app's own surface colour and radius
    tokens instead of Material scheme defaults, elevation: 8 and a raw
    circular(12) — it was a themed island inside the card it opens from.

Verified, not assumed

One backlog item turned out to be based on a wrong premise and is not
"fixed" here: completed tasks are not offered as link candidates. The query
already passes openTaskStatuses, which excludes DONE and REJECTED. The
finding came from tests that stub getTasks to return done/rejected tasks
regardless of the filter argument, which made it look reachable in the UI.

Still deferred, with reasons

  • FTS5 matches beyond the 200-row prefetch. Search filters an in-memory
    prefetch, so a match outside that window is invisible. Fixing it properly
    means querying by match rather than filtering a page, which is a data-layer
    change, not UI.
  • Create-from-search in the picker. EntityPickerSheet already supports
    createFromQuery; wiring it would let the overflow's "Create new linked
    task…" and the last un-migrated AlertDialog collapse into one flow. That is
    a flow redesign worth its own review, not a rider here.
  • Reconciling DesignSystemDropdown's field surface with
    DesignSystemSearch's.
    Genuine inconsistency, but a design-system-level
    decision affecting every caller of both.

Testing

  • New: undo removes exactly the created triple (verified against the
    repository call, not just the SnackBar); a rejected link offers no undo;
    manage mode's inline exit returns to browse mode; entryLinkTypeDbName
    pinned against every EntryLinkType variant.
  • flutter analyze clean project-wide.
  • Full patch coverage on new/changed lines.

Version bumped to 0.9.1064+4244 with its own CHANGELOG and flatpak entries.

Picking a candidate in the link or blocker picker commits on that single tap.
That speed is the point of the flow, so this does not add a confirm step — it
adds recovery. On success the commit is now followed by a message naming what
was written ("Blocks: <title>") with an Undo that removes exactly the
(fromId, toId, type) triple just created, so it can only ever take back the
edge the message is about and never another relationship the same pair holds.

Two experts and two personas raised this across design-review rounds 3-6, and
the low-vision and novice personas both scored it an outright blocker — the
largest single contributor to the gap between the panel's 7.17/7.0 and its
8/10 bar.

Manage mode now says it is on: the header swaps its link action for an inline
Done, and the overflow offers "Manage links…" only as a way in. Previously the
mode was visible only as two icons appearing per row, and the way out was the
same unlabelled menu it was entered from — so the menu item also stops being
two controls for one state.

Also: the picker search field autofocuses on desktop-width windows only (on a
phone it would raise the keyboard over the results it filters), and the
linked-tasks overflow menu uses the app's own surface and radius instead of
Material defaults and a raw radius, so it stops being a themed island inside
the card it opens from.

entryLinkTypeDbName maps a bare EntryLinkType to its linked_entries.type
value, which undo needs since it knows the type but has no EntryLink instance.
A test pins it against every variant, since a mismatch would silently fail to
match the row it just wrote.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@matthiasn, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6265a530-48eb-49ac-89ad-9162781f7a51

📥 Commits

Reviewing files that changed from the base of the PR and between 9b63242 and a4a096c.

📒 Files selected for processing (32)
  • CHANGELOG.md
  • flatpak/com.matthiasn.lotti.metainfo.xml
  • lib/classes/entry_link.dart
  • lib/features/design_system/components/search/design_system_search.dart
  • lib/features/tasks/README.md
  • lib/features/tasks/ui/linked_tasks/blocking_task_picker_modal.dart
  • lib/features/tasks/ui/linked_tasks/link_created_feedback.dart
  • lib/features/tasks/ui/linked_tasks/link_task_modal.dart
  • lib/features/tasks/ui/linked_tasks/linked_tasks_widget.dart
  • lib/l10n/app_cs.arb
  • lib/l10n/app_de.arb
  • lib/l10n/app_en.arb
  • lib/l10n/app_es.arb
  • lib/l10n/app_fr.arb
  • lib/l10n/app_localizations.dart
  • lib/l10n/app_localizations_cs.dart
  • lib/l10n/app_localizations_da.dart
  • lib/l10n/app_localizations_de.dart
  • lib/l10n/app_localizations_en.dart
  • lib/l10n/app_localizations_es.dart
  • lib/l10n/app_localizations_fr.dart
  • lib/l10n/app_localizations_it.dart
  • lib/l10n/app_localizations_nl.dart
  • lib/l10n/app_localizations_pt.dart
  • lib/l10n/app_localizations_ro.dart
  • lib/l10n/app_localizations_sv.dart
  • lib/l10n/app_ro.arb
  • lib/widgets/picker/entity_picker_sheet.dart
  • pubspec.yaml
  • test/classes/entry_link_test.dart
  • test/features/tasks/ui/linked_tasks/link_task_modal_test.dart
  • test/features/tasks/ui/linked_tasks/linked_tasks_widget_actions_test.dart
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/task-links-followup

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.

@matthiasn
matthiasn merged commit c1a3ab2 into main Jul 24, 2026
29 of 30 checks passed
@matthiasn
matthiasn deleted the feat/task-links-followup branch July 24, 2026 23:09
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.22%. Comparing base (362fd0c) to head (a4a096c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3565   +/-   ##
=======================================
  Coverage   99.22%   99.22%           
=======================================
  Files        1774     1775    +1     
  Lines      130106   130139   +33     
=======================================
+ Hits       129093   129126   +33     
  Misses       1013     1013           
Flag Coverage Δ
glados 14.16% <0.00%> (-0.01%) ⬇️
standard 98.97% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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