fix(runtime): resolve white-screen parse regressions and harden checklist/realtime keying
This commit is contained in:
parent
fbe1178e24
commit
75bf72435d
5 changed files with 24 additions and 26 deletions
|
|
@ -2,9 +2,6 @@ import type { BeadDependency, BeadIssueWithProject } from './types';
|
|||
import type { ProjectScopeOption } from './project-scope';
|
||||
import { readIssuesFromDisk } from './read-issues';
|
||||
|
||||
function scopeIssueId(projectKey: string, issueId: string): string {
|
||||
if (issueId.includes('::')) {
|
||||
return issueId;
|
||||
function scopeIssueId(projectKey: string, issueId: string): string {
|
||||
if (issueId.includes('::')) {
|
||||
return issueId;
|
||||
|
|
|
|||
|
|
@ -394,16 +394,16 @@ export function analyzeBlockedChain(model: GraphModel, options: { focusId: strin
|
|||
}
|
||||
}
|
||||
|
||||
const blockers = blockerNodeIds.map(id => model.nodes.find(n => n.id === id)).filter(Boolean) as GraphNode[];
|
||||
const nodeById = new Map(model.nodes.map((n) => [n.id, n]));
|
||||
const blockers = blockerNodeIds.map(id => nodeById.get(id)).filter(Boolean) as GraphNode[];
|
||||
const openBlockers = blockers.filter((b) => b.status !== 'closed');
|
||||
const inProgress = openBlockers.filter((b) => b.status === 'in_progress');
|
||||
const blockers = blockerNodeIds.map((id) => nodeById.get(id)).filter(Boolean) as GraphNode[];
|
||||
const nonClosedBlockers = blockers.filter((b) => b.status !== 'closed');
|
||||
const openBlockers = blockers.filter((b) => b.status === 'open');
|
||||
const inProgress = blockers.filter((b) => b.status === 'in_progress');
|
||||
|
||||
const firstActionable = openBlockers.find((b) => {
|
||||
const firstActionable = nonClosedBlockers.find((b) => {
|
||||
const adj = model.adjacency[b.id];
|
||||
if (!adj) return true;
|
||||
return !adj.incoming.some(e => {
|
||||
return !adj.incoming.some((e) => {
|
||||
if (e.type !== 'blocks') return false;
|
||||
const sourceNode = nodeById.get(e.source);
|
||||
return sourceNode?.status !== 'closed';
|
||||
|
|
|
|||
|
|
@ -50,10 +50,11 @@ export class IssuesEventBus {
|
|||
subscribe(listener: (event: IssuesChangedEvent) => void, options: SubscribeOptions = {}): () => void {
|
||||
const id = this.nextSubscriberId;
|
||||
this.nextSubscriberId += 1;
|
||||
const canonicalRoot = options.projectRoot ? canonicalizeWindowsPath(options.projectRoot) : undefined;
|
||||
|
||||
this.subscribers.set(id, {
|
||||
listener,
|
||||
projectKey: options.projectRoot ? windowsPathKey(options.projectRoot) : undefined,
|
||||
projectKey: canonicalRoot ? windowsPathKey(canonicalRoot) : undefined,
|
||||
});
|
||||
|
||||
return () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue