Skip to content

test: cover the nine lines #3575 left uncovered#3577

Merged
matthiasn merged 1 commit into
mainfrom
fix/task-links-patch-coverage
Jul 25, 2026
Merged

test: cover the nine lines #3575 left uncovered#3577
matthiasn merged 1 commit into
mainfrom
fix/task-links-patch-coverage

Conversation

@matthiasn

@matthiasn matthiasn commented Jul 25, 2026

Copy link
Copy Markdown
Owner

#3575 merged with codecov/patch red. Measuring the merge commit's added
lines against local lcov found nine with no test. All nine are reachable
behaviour rather than scaffolding, and several are the error paths that PR
added specifically so failures stop being silent — so they are worth covering
rather than waiving.

Lines What was untested
link_created_feedback.dart 74, 76, 83, 85 Undo reporting a removal that removed nothing, and one that threw. removeTypedLink returns a row count and throws nothing when it matches no row, which is exactly why these branches exist.
linked_tasks_widget.dart 573 The create path's non-blocking failure message. Only a blocks edge can fail the cycle guard; the existing test covered that branch alone, so the plain-failure branch never ran.
linked_tasks_widget.dart 120 The empty card's "Create new linked task" row — that screen's only worded entry point to the flow.
linked_tasks_widget.dart 423 The link picker reached through manage mode's overflow, where the header slot is taken by Done.
linked_tasks_widget.dart 386 The icon-only link action in a locale whose label will not fit. Asserts it still opens the picker: the action drops its word, not its function.
design_system_list_item.dart 346 subtitleEmphasis on the subtitleSpans path, so the two subtitle paths cannot disagree about which parameter wins.

Six tests, no production changes.

pumpWidget in linked_tasks_widget_actions_test.dart gained width and
locale, matching the helper in linked_tasks_widget_test.dart — via Align,
because the bench hands its child tight constraints and a width set any other
way is silently ignored.

Verification

Added lines of fa842e6bc intersected with coverage/lcov.info: nine
uncovered before, zero after.
fvm flutter analyze clean across lib/ and
test/features; 218 tests green in the touched directories.

Summary by CodeRabbit

  • Tests
    • Added coverage for emphasized subtitle colors in list items.
    • Added validation for unlink failures, including unsuccessful responses and exceptions.
    • Expanded linked-task flow coverage for creating, undoing, managing, and unlinking tasks.
    • Verified responsive layouts and localized action behavior.
    • Strengthened coverage for blocked and non-blocking relationship cycles.

#3575 merged with codecov/patch red. Measured against the merge commit, nine
added lines had no test; all nine are reachable behaviour, not scaffolding:

- Undo reporting a removal that removed nothing, and one that threw. Both
  paths existed precisely so a failed undo stops looking like a successful
  one, and neither was exercised.
- The create path's non-blocking failure message. Only a blocks edge can fail
  the cycle guard, so the other branch names a plain failure — the existing
  test covered the blocks branch alone.
- The empty card's "create new linked task" row, which is that screen's only
  worded entry point to the flow.
- The link picker reached through manage mode's overflow, where the header
  slot is taken by Done.
- The icon-only link action in a locale whose label will not fit, asserting
  it still opens the picker: the action drops its word, not its function.
- subtitleEmphasis on DesignSystemListItem's subtitleSpans path, so the two
  subtitle paths cannot disagree about which parameter wins.

Verified by intersecting the merge commit's added lines with local lcov:
nine before, zero after.
@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 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

The pull request adds widget coverage for DesignSystemListItem subtitle emphasis and expands linked-task tests for undo failures, relationship creation outcomes, cycle messaging, responsive layouts, localization, and manage-mode actions.

Design system validation

Layer / File(s) Summary
Subtitle emphasis rendering
test/features/design_system/components/lists/design_system_list_item_test.dart
Verifies that subtitleEmphasis sets the expected color on the rendered RichText for subtitle spans.

Linked-task interaction validation

Layer / File(s) Summary
Undo failure handling
test/features/tasks/ui/linked_tasks/link_task_modal_test.dart
Adds reusable undo setup and verifies the unlink error message when removal returns zero rows or throws.
Linked-task widget flows
test/features/tasks/ui/linked_tasks/linked_tasks_widget_actions_test.dart
Adds width and locale controls, and tests create flows, typed-link rejection messaging, blocking-cycle messaging, overflow navigation, and constrained German-layout actions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • matthiasn/lotti#3556: Introduced the relationship-link UI behavior covered by these typed-link and unlink-flow tests.
  • matthiasn/lotti#3575: Added the linked-task production flows exercised by the modal, picker, feedback, and manage-mode tests.
  • matthiasn/lotti#3550: Introduced typed-link cycle-guard behavior covered by the relationship rejection assertions.

Suggested reviewers: cyberk1ng

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding tests to cover the nine uncovered lines from PR #3575.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/task-links-patch-coverage

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.

@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 `@test/features/tasks/ui/linked_tasks/linked_tasks_widget_actions_test.dart`:
- Around line 743-753: Remove the redundant expect assertion for the
blocking-cycle message from the test, keeping the existing identical assertion
later in the same test body and preserving the surrounding cycle-handling
coverage.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1d10c650-e88c-42e4-8394-35793aadb1e2

📥 Commits

Reviewing files that changed from the base of the PR and between fa842e6 and 65931ca.

📒 Files selected for processing (3)
  • test/features/design_system/components/lists/design_system_list_item_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

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (fa842e6) to head (65931ca).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3577      +/-   ##
==========================================
+ Coverage   91.06%   99.14%   +8.08%     
==========================================
  Files        1783     1783              
  Lines      130609   130627      +18     
==========================================
+ Hits       118934   129515   +10581     
+ Misses      11675     1112   -10563     
Flag Coverage Δ
glados 14.10% <ø> (ø)
standard 98.89% <ø> (+9.06%) ⬆️

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.

@matthiasn
matthiasn merged commit 19d1c45 into main Jul 25, 2026
27 checks passed
@matthiasn
matthiasn deleted the fix/task-links-patch-coverage branch July 25, 2026 12:49
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