Commit Graph

3 Commits

Author SHA1 Message Date
devin-ai-integration[bot] 4728f2da91 FABLE_CLEANUP: fix(action): 20-day audit fixes for the GitHub Action and workflows (#1015)
Co-authored-by: Aiden Bai <aiden.bai05@gmail.com>
Co-authored-by: Rayhan Noufal Arayilakath <me@rayhanadev.com>
2026-07-02 01:29:50 -07:00
Ray Arayilakath 242bf69451 ci: action version-bump guard + faster CI (turbo remote cache, concurrency) (#885)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 01:49:22 -04:00
Nisarg Patel c2198ed675 feat: order the diagnostics dump by rule priority (#590)
* feat: order the diagnostics dump by rule priority

Users report that `npx react-doctor` prints a large, undifferentiated dump and
they don't know what to tackle first. The score API now returns an intrinsic
priority/tier per rule; surface it so the dump leads with what's most worth
fixing instead of ordering purely by severity.

- core: `ScoreResult` carries the API's `rules: {ruleKey: {priority, tier}}`
  payload (new `RulePriority`/`RuleTier` types); `parseScoreResult` captures it.
- CLI: rule-groups and categories sort by `effectivePriority` (API priority
  desc). Unranked rules get a severity-based midpoint; with no score at all
  (`--no-score` / API unreachable) ordering degrades to the previous
  error-before-warning + count order, so there is no regression offline.

No priority table is duplicated here — the engine remains the single source of
truth and the values arrive over the score API.

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

* fix(cli): improve error handling for command execution failures

* refactor(core): validate the score API response with effect/Schema

Replace the hand-rolled type guards in `parseScoreResult`/`parseRulePriorities`
with `effect/Schema` (the schema lib already used across @react-doctor/core, see
schemas.ts) — `Schema.Struct` + `Schema.Literals` + `Schema.Record` decoded via
`decodeUnknownOption`. A malformed payload decodes to null and falls back to the
severity ordering, same as before. Result types are now `readonly` to match the
decoded shape.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 22:49:53 -07:00