Skip to content

fix(score): align scorePoller type with forgeplan score --json wrappe…#71

Merged
fedorovvvv merged 1 commit into
developfrom
fix/score-poller-type
May 7, 2026
Merged

fix(score): align scorePoller type with forgeplan score --json wrappe…#71
fedorovvvv merged 1 commit into
developfrom
fix/score-poller-type

Conversation

@fedorovvvv
Copy link
Copy Markdown
Collaborator

…r shape

forgeplan score --all --json returns { errors, results: ScoreEntry[] }, but scorePoller was typed as ScoreEntry[] and consumers called .map(...) directly on the wrapper, throwing (... ?? []).map is not a function at runtime in InsightsRail and ForceView (via HomePage's scores derived).

Introduce ScoreResponse, retype the poller, read data.results in the two call sites. No API contract change — endpoint stays a passthrough.

Refs: rule 22 (read-only proxy preserved)

…r shape

`forgeplan score --all --json` returns `{ errors, results: ScoreEntry[] }`,
but scorePoller was typed as `ScoreEntry[]` and consumers called `.map(...)`
directly on the wrapper, throwing `(... ?? []).map is not a function` at
runtime in InsightsRail and ForceView (via HomePage's `scores` derived).

Introduce ScoreResponse, retype the poller, read `data.results` in the two
call sites. No API contract change — endpoint stays a passthrough.

Refs: rule 22 (read-only proxy preserved)
@fedorovvvv fedorovvvv enabled auto-merge May 7, 2026 16:30
@fedorovvvv fedorovvvv merged commit 5e5af4d into develop May 7, 2026
3 checks passed
@fedorovvvv fedorovvvv deleted the fix/score-poller-type branch May 7, 2026 16:32
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