chore: close quality-gate coverage gaps (#1689) (#1766)
Some checks failed
Run install, format, lint, build, and test on every push / build (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish-github-container-registry (push) Has been cancelled
Some checks failed
Run install, format, lint, build, and test on every push / build (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish-github-container-registry (push) Has been cancelled
Closes #1689. Typecheck cli/tui src, add a core/ format+lint gate, and gate core/json + core/client coverage. See PR #1766 for the full review history.
This commit is contained in:
parent
d76c4d5379
commit
373f346e5f
2 changed files with 2210 additions and 467 deletions
|
|
@ -72,7 +72,10 @@ export class ManagedRequestorTasksState extends TypedEventTarget<ManagedRequesto
|
|||
// A status update is ignored when the task was dismissed (clearCompleted)
|
||||
// or when the user cancelled it and the update isn't itself "cancelled" —
|
||||
// the deliberate cancel wins over a late completed/working update.
|
||||
const shouldIgnoreUpdate = (taskId: string, status: Task["status"]): boolean =>
|
||||
const shouldIgnoreUpdate = (
|
||||
taskId: string,
|
||||
status: Task["status"],
|
||||
): boolean =>
|
||||
this.dismissedTaskIds.has(taskId) ||
|
||||
(this.cancelledTaskIds.has(taskId) && status !== "cancelled");
|
||||
const onTaskStatusChange = (
|
||||
|
|
@ -200,7 +203,9 @@ export class ManagedRequestorTasksState extends TypedEventTarget<ManagedRequesto
|
|||
* whole refresh. No known tasks ⇒ a no-op refresh (the correct "no server
|
||||
* list" semantics).
|
||||
*/
|
||||
private async refreshModern(client: InspectorClientProtocol): Promise<Task[]> {
|
||||
private async refreshModern(
|
||||
client: InspectorClientProtocol,
|
||||
): Promise<Task[]> {
|
||||
const ids = this.tasks
|
||||
.map((t) => t.taskId)
|
||||
.filter((id) => !this.dismissedTaskIds.has(id));
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@ import type {
|
|||
InspectorResourceSubscription,
|
||||
ResourceSubscriptionStreamState,
|
||||
} from "../types.js";
|
||||
import { isTerminalStatus, INACTIVE_SUBSCRIPTION_STREAM_STATE } from "../types.js";
|
||||
import {
|
||||
isTerminalStatus,
|
||||
INACTIVE_SUBSCRIPTION_STREAM_STATE,
|
||||
} from "../types.js";
|
||||
import type { Resource } from "@modelcontextprotocol/client";
|
||||
import {
|
||||
TypedEventTarget,
|
||||
|
|
|
|||
Loading…
Reference in a new issue