Skip to content

fix(app): hide evidence tasks not added to the org (no more "Not added")#3006

Merged
tofikwest merged 2 commits into
mainfrom
tofik/hide-not-added-evidence-tasks
Jun 3, 2026
Merged

fix(app): hide evidence tasks not added to the org (no more "Not added")#3006
tofikwest merged 2 commits into
mainfrom
tofik/hide-not-added-evidence-tasks

Conversation

@tofikwest
Copy link
Copy Markdown
Contributor

@tofikwest tofikwest commented Jun 3, 2026

Problem

On the integration service detail page (e.g. Amazon Web Services → S3 Bucket Security → "Evidence provided") and the provider-level "Evidence tasks" list, mapped task templates that have no live task in the org render as "Not added". Customers see that and ask "why isn't this added?" — which we don't want. Affects all cloud providers (shared components).

Fix

Show only evidence tasks that actually exist in the org, and make each list's count match what's shown:

  • ServiceDetailView + IntegrationEvidenceTasks: filter mapped tasks to those resolved against the org's task templates; the count badge reflects the filtered set.
  • ServiceDetailView preserves the tasks-fetch-error case: on a real fetch error we can't distinguish added vs not-added, so it shows all rows (which render "Couldn't load", not a misleading "Not added").

Tests

  • IntegrationEvidenceTasks.test.tsx and ServiceDetailView.test.tsx (4 tests): assert not-added tasks are hidden, the count reflects added-only, no "Not added" text renders, and the error path still shows all rows with a "Couldn't load" notice. All pass.
  • App typecheck: my files are clean (the pre-existing .test/auth-client errors on main are unrelated and not in this diff).

Follow-up (not in this PR)

The service card in the grid still shows a task-count badge = total mapped tasks, so a card could read "2" while the detail shows "1". Threading the org task templates into the grid would make the card count match — happy to add if wanted.

🤖 Generated with Claude Code


Summary by cubic

Hide evidence tasks that aren’t added to the org in integration views, and make the count badges match what’s visible. On task fetch errors, show all mapped tasks with a “Couldn't load tasks” notice instead of “Not added”.

  • Bug Fixes
    • Filter mapped tasks to only those with live org tasks in ServiceDetailView and IntegrationEvidenceTasks; badge counts match the filtered list.
    • Empty state: provider view renders nothing; service detail shows “This service doesn’t map to any evidence task yet.”
    • Preserve the error path: when the tasks fetch fails, show all mapped tasks and surface “Couldn't load tasks,” never “Not added.”
    • Added tests for visibility, count badges, empty states, and the error case.

Written for commit 4ba2447. Summary will update on new commits.

Review in cubic

The service detail "Evidence provided" list and the provider "Evidence tasks"
list rendered template mappings that have no live task in the org as "Not
added", which prompts customers to ask why a task isn't added. Show only
evidence tasks that actually exist in the org, and make each list's count match
what's shown. Applies to all cloud providers (shared components).

- ServiceDetailView + IntegrationEvidenceTasks: filter mapped tasks to those
  resolved against the org's task templates; counts reflect the filtered set.
- ServiceDetailView preserves the tasks-fetch-error case: when the fetch failed
  we can't distinguish added from not-added, so show all (the row reads
  "Couldn't load" instead of a misleading "Not added").
- Tests for both components.

Follow-up (not in this PR): the service card's task-count badge in the grid
still shows total mapped tasks; threading org task templates into the grid would
make that count match the detail too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 3, 2026 2:34am
comp-framework-editor Ready Ready Preview, Comment Jun 3, 2026 2:34am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Jun 3, 2026 2:34am

Request Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@vercel vercel Bot temporarily deployed to Preview – portal June 3, 2026 02:31 Inactive
@tofikwest tofikwest merged commit c9f1d7d into main Jun 3, 2026
11 checks passed
@tofikwest tofikwest deleted the tofik/hide-not-added-evidence-tasks branch June 3, 2026 02:34
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.68.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants