Skip to content

Commit e02e4fc

Browse files
mpstatonclaude
andcommitted
fix(org-workbench, staged-people): accept carries the crawled links and consumes the row
Two accept-flow gaps from the first real team crawl: (1) the LinkedIn/ bio URLs didi found never landed on the person — person.apply's create branch writes linkedin_profile_url as a scalar matching field only, no personal_links entry — so accept now follows apply+affiliate with person.links.add for the crawled links, on CREATED persons only (matched persons may already carry them; additive not duplicative), soft-failing so a link hiccup can't fail the accept. (2) The accepted row lingered in the staged list next to the now-real person — a double-save waiting to happen; accepted rows are now consumed, with the person's appearance in the People list as the confirmation. The unused 'done' display state goes with it. Closes #37. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UvYzx7vDWeafnkAi2nEQeb
1 parent 2846b7f commit e02e4fc

3 files changed

Lines changed: 32 additions & 11 deletions

File tree

apps/org-workbench/src/StagedPeople.svelte

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
// discipline: no-candidate rows flow straight through person.apply(create)
55
// + person.affiliate; ambiguous rows open the candidate gate (pick the
66
// match or explicitly create). The team-page URL rides every write as the
7-
// observation source. Skip discards a row; nothing persists until accept.
7+
// observation source; the crawled LinkedIn/bio links land on CREATED
8+
// persons via person.links.add (matched persons may already carry them —
9+
// additive, not duplicative). An accepted row is CONSUMED — it leaves the
10+
// staged list; the person appearing in the People list above is the
11+
// confirmation (gh #37). Skip discards a row; nothing persists until accept.
812
// Per context-v/plans/Didi-Crawl-Three-Targets-Relevance-Brief-And-Staged-Team-Ingest.md.
913
1014
import {
1115
fetchPersonCandidates,
1216
applyPerson,
1317
affiliatePerson,
18+
addPersonLink,
1419
type CrawledPerson,
1520
} from './lib/org-client';
1621
import type { PersonCandidate } from './lib/types';
@@ -35,7 +40,7 @@
3540
onclear: () => void;
3641
} = $props();
3742
38-
type RowPhase = 'staged' | 'gate' | 'writing' | 'done';
43+
type RowPhase = 'staged' | 'gate' | 'writing';
3944
type Row = {
4045
person: CrawledPerson;
4146
phase: RowPhase;
@@ -51,7 +56,7 @@
5156
people.map((person) => ({ person, phase: 'staged', candidates: [], error: null, skipped: false })),
5257
);
5358
54-
const remaining = $derived(rows.filter((r) => !r.skipped && r.phase !== 'done').length);
59+
const remaining = $derived(rows.filter((r) => !r.skipped).length);
5560
5661
function sourceFor(row: Row): string {
5762
return row.person.bio_url ?? source_urls[0] ?? 'didi-crawl';
@@ -100,7 +105,24 @@
100105
client,
101106
source: sourceFor(row),
102107
});
103-
row.phase = 'done';
108+
// The crawl's links ride the accept — created persons only (a matched
109+
// person may already carry them). Soft-fail: person + affiliation are
110+
// the core writes; a link hiccup shouldn't fail the accept.
111+
if (applied.created) {
112+
const links = [row.person.linkedin_url, row.person.bio_url].filter(
113+
(u): u is string => Boolean(u),
114+
);
115+
for (const url of links) {
116+
try {
117+
await addPersonLink({ person_uuid: applied.person_uuid, url, client });
118+
} catch {
119+
/* soft */
120+
}
121+
}
122+
}
123+
// Consume the row — the person now shows in the People list above;
124+
// a lingering staged copy is a double-save waiting to happen.
125+
row.skipped = true;
104126
onchanged();
105127
} catch (err) {
106128
row.error = err instanceof Error ? err.message : String(err);
@@ -128,7 +150,7 @@
128150
<ul class="ow-staged-list">
129151
{#each rows as row (row.person.name)}
130152
{#if !row.skipped}
131-
<li class="ow-staged-row" class:done={row.phase === 'done'}>
153+
<li class="ow-staged-row">
132154
<div class="ow-staged-main">
133155
<span class="ow-person-name">{row.person.name}</span>
134156
{#if row.person.role}<span class="ow-person-role">{row.person.role}</span>{/if}
@@ -139,9 +161,7 @@
139161
<a class="ow-url" href={row.person.bio_url} target="_blank" rel="noreferrer">bio</a>
140162
{/if}
141163
<span class="ow-staged-actions">
142-
{#if row.phase === 'done'}
143-
<span class="ow-added">added ✓</span>
144-
{:else if row.phase === 'writing'}
164+
{#if row.phase === 'writing'}
145165
<span class="ow-staged-busy">writing…</span>
146166
{:else}
147167
<button type="button" class="ow-add-go" onclick={() => accept(row)}>Accept</button>

apps/org-workbench/src/app.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
.ow-staged-note { margin: 0.3rem 0 0; font-size: 0.78rem; font-style: italic; color: var(--color-text-muted, #9aa0aa); }
5252
.ow-staged-list { margin: 0.5rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
5353
.ow-staged-row { padding: 0.4rem 0.5rem; border: 1px solid var(--color-border, #2a2c33); border-radius: 6px; }
54-
.ow-staged-row.done { opacity: 0.55; }
5554
.ow-staged-main { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
5655
.ow-staged-actions { margin-left: auto; display: flex; gap: 0.35rem; align-items: center; }
5756
.ow-staged-busy { font-size: 0.8rem; color: var(--color-text-muted, #9aa0aa); }

context-v/issues/Team-Crawl-Accept-Drops-Crawled-Links-And-Leaves-The-Staged-Row.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ authors:
77
- Michael Staton
88
augmented_with:
99
- Claude Code on Claude Fable 5
10-
semantic_version: 0.0.0.1
10+
semantic_version: 0.0.0.2
1111
tags:
1212
- Issue
1313
- Usability
1414
- Augment-It
1515
- Didi-Crawl
1616
- Persons
1717
- Org-Workbench
18-
status: Open
18+
status: Shipped
19+
date_first_published: 2026-07-24
20+
post_ship_note: "Shipped 2026-07-24 — accept adds the crawled linkedin_url/bio_url via person.links.add on created persons (soft-fail), and the accepted row is consumed from the staged list. gh #37 closed."
1921
---
2022

2123
# Team-crawl accept: links dropped, row lingers

0 commit comments

Comments
 (0)