Skip to content

fix(linear): show 'Cannot verify' when skill scan is inconclusive - #20964

Merged
AmethystLiang merged 1 commit into
mainfrom
jinjing/sta-7339-linear-面板的接入进度显示不对-三步都完成时仍显示「已完成-13」而不是「全部就绪」。
Sep 16, 2026

Hidden character warning

The head ref may contain hidden characters: "jinjing/sta-7339-linear-\u9762\u677f\u7684\u63a5\u5165\u8fdb\u5ea6\u663e\u793a\u4e0d\u5bf9-\u4e09\u6b65\u90fd\u5b8c\u6210\u65f6\u4ecd\u663e\u793a\u300c\u5df2\u5b8c\u6210-13\u300d\u800c\u4e0d\u662f\u300c\u5168\u90e8\u5c31\u7eea\u300d\u3002"
Merged

AmethystLiang merged 1 commit into
mainfrom
jinjing/sta-7339-linear-面板的接入进度显示不对-三步都完成时仍显示「已完成-13」而不是「全部就绪」。

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​298 $\color{#cf222e}{\Huge{\mathbf{−}}}$​93 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​205
Prod 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​213 $\color{#cf222e}{\Huge{\mathbf{−}}}$​72 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​141

Problem

When a skill scan couldn't verify whether the Linear agent skill was installed (e.g., due to an unreachable source or error before getting results), the setup checklist incorrectly counted this as an incomplete step. It would show "2 of 3 ready" and offer to Install the skill—even though the skill might already be installed and the uncertainty was just about readability.

Solution

Added an installedUnverifiable verdict to distinguish inconclusive scans from confirmed absences. The setup checklist now shows "Cannot verify" with an attention tone when a scan is inconclusive, while keeping the confirmed step count (e.g., "2/3") visible. This clarifies the uncertainty is about readability, not a missing step.

What Changed

  • New skill-unverified status in setup state with proper precedence (after checking/connection, before confirmed absence)
  • LinearAgentSkillGuide and TaskSourceProviderCard both render "Cannot verify" instead of treating unverifiable scans as failures
  • New installed-agent-skill-verdict.ts hook computes when a scan is unverifiable (unread roots or errors before any result)
  • useInstalledAgentSkills exposes installedUnverifiable verdict on the state
  • Full test coverage: unverifiable alone, combined with other failures, rescan behavior while checking, and interaction with visibility steps
  • Localization strings for both English and Chinese ("无法验证")

Testing

  • All new tests added covering the unverifiable verdict logic and UI rendering
  • Existing tests updated to work with renamed props (status → readiness, connectionChecking → checking, visibleInTasks → visible)

A scan that encounters an error before discovering skills, or hits an
unreadable root, cannot vouch for "not installed". Previously these cases
were conflated with proven absence, so the checklist would claim the skill
step incomplete even when all three steps had been finished. Now the UI
distinguishes between confirmed states and unknown ones, showing "Cannot
verify" instead of listing the skill as an unfinished step.

@pullfrog pullfrog 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.

ℹ️ No critical issues. One rough edge worth a look: the expanded Task Sources card still paints the unverified skill as an unfinished step.

Reviewed changes

  • New installedUnverifiable verdict — installed-agent-skill-verdict.ts extracts hasUnreadableAgentSkillSource and adds getInstalledAgentSkillVerdict, which doubts a negative when a queried root is unreadable or the scan errored before answering, while a landed answer survives a later refresh failure.
  • useInstalledAgentSkills surfaces the verdict — returns installedUnverifiable and folds the advisory error through it; settled is unchanged in meaning.
  • skill-unverified setup status — added to TaskProviderSetupStatus/tone table and returned after connection/ready checks but before skill-required, so ready is still unreachable with an unverified skill.
  • LinearAgentSkillGuide — renamed status→readiness (connectionChecking→checking, visibleInTasks→visible), routes its pill through the shared status, adds a TriangleAlert row icon and a separate confirmed-count badge.
  • TaskSourceProviderCard — renders "Cannot verify" for the new status, keeping the completed/total badge.
  • Localization — setupUnverified / statusUnverified for en + zh, pinned by the status-label localization test.

ℹ️ The expanded Task Sources card still treats an unverified skill as an unfinished step

TaskSourceLinearSetup derives step 2's badge from skillInstalled alone, so an inconclusive scan still renders the numbered pending badge and leaves the Install CTA in place — directly under a header pill that now reads "Cannot verify". The verdict is already available from useLinearAgentSkillSetup(); it just is not consumed there, so the card's two halves disagree about the same fact.

Technical details
# Unverified skill still rendered as pending in the expanded Task Sources card

## Affected sites
- src/renderer/src/components/settings/TaskSourceLinearSetup.tsx:35 — `skillState` is `skillChecking ? 'in-progress' : skillInstalled ? 'done' : 'pending'`; `skillUnverifiable` is destructured by the same hook but unused, so step 2 shows the numbered pending badge.
- src/renderer/src/components/settings/TaskSourceLinearSetup.tsx:141 — `AgentSkillSetupPanel` is passed `installed={skillSetup.skillInstalled}` only; the panel has no knowledge of the verdict, so it still offers Install.
- The settings-pane copy shares the same shape (`LinearAgentSkillPane.tsx:87`), but the inline panel's header is hidden there, so the contradiction is only the action CTA.

## Required outcome
- When the scan is unverifiable, the Task Sources step row should present the step as unknown rather than pending (e.g. a warning state alongside the new "Cannot verify" pill), so the expanded card agrees with its own header.

## Open questions for the human
- Is keeping the Install CTA intentional as a recovery action while only the status copy changes? The comment in `task-source-setup-state.ts` says the status exists to avoid "Install, which reinstalls a skill that may be present", but the CTA is driven by `skillInstalled`, not by the status.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 856d627d-15cf-463a-a2b4-d2b837c96422

📥 Commits

Reviewing files that changed from the base of the PR and between b0d46e2 and 38c7467.

📒 Files selected for processing (19)
  • src/renderer/src/components/settings/LinearAgentSkillGuide.test.tsx
  • src/renderer/src/components/settings/LinearAgentSkillGuide.tsx
  • src/renderer/src/components/settings/LinearAgentSkillPane.test.tsx
  • src/renderer/src/components/settings/LinearAgentSkillPane.tsx
  • src/renderer/src/components/settings/TaskSourceProviderCard.test.tsx
  • src/renderer/src/components/settings/TaskSourceProviderCard.tsx
  • src/renderer/src/components/settings/task-source-setup-state.test.ts
  • src/renderer/src/components/settings/task-source-setup-state.ts
  • src/renderer/src/components/settings/use-linear-agent-skill-setup.ts
  • src/renderer/src/components/settings/use-task-source-provider-readiness.test.tsx
  • src/renderer/src/components/settings/use-task-source-provider-readiness.ts
  • src/renderer/src/hooks/installed-agent-skill-verdict.test.ts
  • src/renderer/src/hooks/installed-agent-skill-verdict.ts
  • src/renderer/src/hooks/useInstalledAgentSkills.react.test.tsx
  • src/renderer/src/hooks/useInstalledAgentSkills.test.ts
  • src/renderer/src/hooks/useInstalledAgentSkills.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/settings-status-label-localization.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change adds an unverifiable state for agent-skill scans. Discovery logic now preserves trusted answers and marks unanswered or unreadable negative results as unverifiable. Setup readiness propagates this state to Linear components. Setup guides and provider cards render “Cannot verify” with attention styling and completion counts. Tests cover scan verdicts, precedence rules, readiness propagation, UI rendering, and localization.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 38c74

The readiness UI preserves verified skill results and represents only genuinely inconclusive scans as unverified; no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, solution, scope, and testing, but it omits several required template sections. It does not provide a linked issue, visual proof or an explicit N/A explanation, AI… Add the required template sections. Include a valid “Fixes #” issue reference, attach before-and-after UI evidence or write “N/A” with a reason, complete the AI Disclosure and Review sections, confirm the agent skill upstream boundary, addr…
Docstring Coverage ⚠️ Warning Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 17 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: showing “Cannot verify” when the Linear skill scan is inconclusive.
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.
Full details: Description check

Explanation

The description explains the problem, solution, scope, and testing, but it omits several required template sections. It does not provide a linked issue, visual proof or an explicit N/A explanation, AI disclosure, review details, boundary confirmation, notes, or checklist status.

Resolution

Add the required template sections. Include a valid “Fixes #” issue reference, attach before-and-after UI evidence or write “N/A” with a reason, complete the AI Disclosure and Review sections, confirm the agent skill upstream boundary, address the Notes items, and complete the Checklist.

Full details: Docstring Coverage

Explanation

Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 17 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@AmethystLiang
AmethystLiang merged commit 4948afc into main Sep 16, 2026
29 checks passed
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
…ablyai#20964)

A scan that encounters an error before discovering skills, or hits an
unreadable root, cannot vouch for "not installed". Previously these cases
were conflated with proven absence, so the checklist would claim the skill
step incomplete even when all three steps had been finished. Now the UI
distinguishes between confirmed states and unknown ones, showing "Cannot
verify" instead of listing the skill as an unfinished step.
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