Skip to content

fix(vscode): show an unconfigured Rstack lint config as not detected - #95

Merged
fi3ework merged 1 commit into
mainfrom
fix/rslint-unconfigured-not-detected
Oct 10, 2026
Merged

fi3ework merged 1 commit into
mainfrom
fix/rslint-unconfigured-not-detected

Conversation

@fi3ework

@fi3ework fi3ework commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Before After
Code 2026-10-10 13 57 24 Google Chrome 2026-10-10 14 26 43

Follow-up to #94. A bridged lint runtime whose root rstack.config.* has no define.lint() reported running with a detail. In the status bar hover that is a green check beside Rslint, with the reason visible only in the icon's native tooltip, so a formatting-only project looked like Rslint was linting it. The status bar's existing word for "this tool has no configuration here" is not-detected, so the unconfigured verdict now maps to it, and the reason is shown as a notice row under the hover table.

 StackState
-  | { kind: 'not-detected' }
+  | { kind: 'not-detected'; detail?: string }   # set only by a runtime-level "nothing configured" verdict
 status bar
-  not-detected: spellsOutDetail: false
+  not-detected: spellsOutDetail: true           # notice row only when a detail exists
 Rslint (bridged, shim refuses: no define.lint())
-  running — no define.lint() in rstack.config.ts
+  not-detected — no define.lint() in rstack.config.ts
   ok after define.lint() appears → running (same worker, no restart)

What the user sees for a formatting-only project: hover Rstack in the status bar → the Rslint row shows the grey circle-slash icon, and one notice row reads no define.lint() in rstack.config.ts. The item text stays $(zap) Rstack, the per-stack restart action is still offered, there is still no toast, no crashed, no dependency poll, and one info line in the Output channel. Every other hover is unchanged: detection's own not-detected carries no detail and therefore adds no notice row.

Fold rules, written as comments in stacks/lint/status.ts:

  • A folder whose only runtimes are unconfigured folds to not-detected with its detail (not masked into running: idle).
  • A healthy native runtime beside an unconfigured bridged one wins (running): the folder is linting. The same rank applies across folders in multi-root.

The worker stays alive underneath not-detected, which is the reverse of how running: idle decouples state from process. packages/vscode/AGENTS.md adaptation 7 and the lint-shim gotcha are updated accordingly.

Evidence

  • pnpm lint ✓ · pnpm fmt:check ✓ · pnpm test:unit 370 passed, 0 failed.
  • Lint E2E on macOS with VSCODE_CLI=1: Rstack fmt-only config, Missing config dependency, Rstack lint bridge, JS config tests all Exit code: 0. The fmt-only suite now waits for kind === 'not-detected' with a define.lint() detail on both the folder and the runtime state, then adds define.lint() and asserts plain running plus the no-debugger diagnostic from the same worker pid.
  • Negative check: with the suite's predicate reverted to the old running shape it fails with Timed out waiting for the unconfigured not-detected detail, so the assertion is live.
  • Manual check with the packaged VSIX in a clean profile on a define.fmt()-only project (rstack 0.8.2): hover shows the Rslint row with the circle-slash icon and the notice no define.lint() in rstack.config.ts; the Output channel logs Rslint status: not detected — no define.lint() in rstack.config.ts.

Merge Danger

Door: two-way

Revert restores the running + detail shape from #94. No settings, protocol versions or published surfaces change; the not-detected detail is editor-internal state.

Blast Radius: status bar + lint-bridged

StackState['not-detected'] gains an optional field, read only by the status bar's notice rendering and lint's fold helpers. Only bridged lint runtimes whose shim refuses produce it; fmt, Rstest and native Rslint runtimes never set it.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Follow-up to #94 (#93). A bridged lint runtime whose root rstack.config.*
has no define.lint() reported `running` with a detail, which the status
bar hover rendered as a green check beside Rslint with the reason only
in the icon tooltip. The status bar's word for "this tool has no
configuration here" is `not-detected`, so the `unconfigured` verdict now
maps to `{ kind: 'not-detected', detail }` and the reason is shown as a
hover notice row.

- `StackState['not-detected']` gains an optional `detail`; only a
  runtime-level "nothing configured" verdict sets it, detection never
  does, so every other hover is unchanged.
- The status bar spells out the `not-detected` detail; one shared
  `stackStateDetail` replaces the two identical switches in the shell
  and the lint fold.
- `liveRslintStatus` / `reportLive` (renamed from `running*`) keep the
  advisory-wins precedence; the worker stays up, no poll, no toast.
- Fold: an unconfigured-only folder stays `not-detected` with its
  reason; a healthy native runtime beside it wins.
- AGENTS.md adaptation 7 and the lint-shim gotcha record the design,
  including that the verdict lives with the runtime (an idle folder
  reads `running: idle` until a document opens).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T06:23:50.751975Z 898d945 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fi3ework
fi3ework enabled auto-merge (squash) October 10, 2026 06:30
@fi3ework
fi3ework merged commit ce8be40 into main Oct 10, 2026
3 checks passed
@fi3ework
fi3ework deleted the fix/rslint-unconfigured-not-detected branch October 10, 2026 06:31
@fi3ework fi3ework mentioned this pull request Oct 10, 2026
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