Skip to content

fix(tasks): limit similar task suggestions - #4799

Merged
ehayes2000 merged 1 commit into
mainfrom
macro/macro-cC26nhLULXNaULMaaCff7-only-show-2-similar-tasks-in-the-task-creation-modal
Jul 14, 2026
Merged

ehayes2000 merged 1 commit into
mainfrom
macro/macro-cC26nhLULXNaULMaaCff7-only-show-2-similar-tasks-in-the-task-creation-modal

Conversation

@ehayes2000

Copy link
Copy Markdown
Contributor

Limits the task creation modal to the top two similar task suggestions for task cC26nhLULXNaULMaaCff7.

@macro-application

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Improvements
    • Limited the “Similar Tasks” section to display a maximum of two matches, making results easier to scan.

Walkthrough

The similar tasks component introduces a maximum of two displayed similarity matches and applies that limit when the search input is non-empty.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format and is under the 72-character limit.
Description check ✅ Passed The description matches the change by stating that only the top two similar task suggestions are shown.
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.

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.

@github-actions

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@apps/web/src/features/block-md/component/TaskDuplicateList.tsx`:
- Line 54: Update the duplicate-list flow around TaskDuplicateList and
ComposeTask so the MAX_SIMILAR_TASKS truncation applies only to the intended
task, not every SimilarTasksInner instance. Gate the cap upstream or pass task
context into TaskDuplicateList, while preserving the full valid suggestions for
other tasks.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b936cce1-37a4-4c92-915a-e22c067e0a45

📥 Commits

Reviewing files that changed from the base of the PR and between 5934c81 and b95cc2f.

📒 Files selected for processing (1)
  • apps/web/src/features/block-md/component/TaskDuplicateList.tsx

};
const results = (): TaskSimilarityResult[] =>
hasInput() ? (similarity.data ?? []) : [];
hasInput() ? (similarity.data ?? []).slice(0, MAX_SIMILAR_TASKS) : [];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the referenced file and relevant composer usages
git ls-files 'apps/web/src/features/block-md/component/TaskDuplicateList.tsx' \
  'apps/web/src/**' | sed -n '1,20p'

echo '--- outline TaskDuplicateList.tsx ---'
ast-grep outline apps/web/src/features/block-md/component/TaskDuplicateList.tsx --view expanded || true

echo '--- search for MAX_SIMILAR_TASKS and SimilarTasksInner / ComposeTask ---'
rg -n "MAX_SIMILAR_TASKS|SimilarTasksInner|ComposeTask|cC26nhLULXNaULMaaCff7|similarity\.data" apps/web/src -S

Repository: macro-inc/macro

Length of output: 3263


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect file contents around the cited line
wc -l apps/web/src/features/block-md/component/TaskDuplicateList.tsx
sed -n '1,180p' apps/web/src/features/block-md/component/TaskDuplicateList.tsx

Repository: macro-inc/macro

Length of output: 5623


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find any task-specific gating around this feature
rg -n "cC26nhLULXNaULMaaCff7|similarity|duplicate task|duplicate list|two matches|MAX_SIMILAR_TASKS" apps/web/src -S

Repository: macro-inc/macro

Length of output: 1384


Scope the two-result cap to the intended task. TaskDuplicateList.tsx truncates every SimilarTasksInner instance to two matches, and ComposeTask uses this section in the generic composer flow. If this should only apply to one task, gate it upstream or pass task context through here so other tasks keep valid suggestions.

🤖 Prompt for 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.

In `@apps/web/src/features/block-md/component/TaskDuplicateList.tsx` at line 54,
Update the duplicate-list flow around TaskDuplicateList and ComposeTask so the
MAX_SIMILAR_TASKS truncation applies only to the intended task, not every
SimilarTasksInner instance. Gate the cap upstream or pass task context into
TaskDuplicateList, while preserving the full valid suggestions for other tasks.

@ehayes2000
ehayes2000 merged commit b0a211a into main Jul 14, 2026
24 checks passed
@ehayes2000
ehayes2000 deleted the macro/macro-cC26nhLULXNaULMaaCff7-only-show-2-similar-tasks-in-the-task-creation-modal branch July 14, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant