Skip to content

Commit c97ec24

Browse files
Merge PR #71: remove Loom and save project memories automatically
Removes Loom from web, desktop, mobile, server, contracts, and docs. Migration 91 drops the six indexes that only Loom read, and the shell's pending-secret lookup now names its status index so that drop does not change its plan. Also lands #72, which saves project facts without an approval queue. Migration 92 rewrites stored facts to the saved and forgotten states. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 parents e8f9e52 + 28132ce commit c97ec24

105 files changed

Lines changed: 1119 additions & 10259 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/mobile/src/Stack.tsx‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ import { AddProjectLocalRoute } from "./features/projects/AddProjectLocalRoute";
7878
import { AddProjectNewRoute } from "./features/projects/AddProjectNewRoute";
7979
import { AddProjectRepositoryRoute } from "./features/projects/AddProjectRepositoryRoute";
8080
import { AddProjectSourceRoute } from "./features/projects/AddProjectSourceRoute";
81-
import { ProjectLoomRouteScreen } from "./features/loom/ProjectLoomRouteScreen";
8281
import {
8382
NewTaskBranchPickerRouteScreen,
8483
NewTaskEnvironmentPickerRouteScreen,
@@ -507,11 +506,6 @@ const RootStackConfig = createWorkspaceStackNavigator({
507506
...getCompactBrandHeaderOptions(),
508507
},
509508
}),
510-
ProjectLoom: createNativeStackScreen({
511-
screen: ProjectLoomRouteScreen,
512-
linking: "projects/:environmentId/:projectId/loom",
513-
options: pageRoute(),
514-
}),
515509
PullRequest: createNativeStackScreen({
516510
screen: PullRequestRouteScreen,
517511
linking: {

‎apps/mobile/src/components/ProjectKnowledgeEntry.test.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const fact: ProjectFact = {
245245
tags: [],
246246
kind: "note",
247247
sources: [],
248-
status: "proposed",
248+
status: "saved",
249249
revision: 1,
250250
trust: 0.5,
251251
retrievalCount: 0,
@@ -486,7 +486,6 @@ it("shows user origin once without treating the assertion as a citation", async
486486
const asserted: ProjectFact = {
487487
...fact,
488488
origin: { kind: "user" },
489-
status: "confirmed",
490489
sources: [{ kind: "user" }],
491490
};
492491
state.list = { facts: [asserted], nextCursor: null };
@@ -681,7 +680,6 @@ it("marks a superseded fact read-only and lists superseded facts on request", as
681680
await screen.click(`Inspect fact: ${fact.content}`);
682681
const labels = [...screen.container.querySelectorAll("button")].map((item) => item.textContent);
683682
expect(labels).not.toContain("Edit");
684-
expect(labels).not.toContain("Confirm");
685683
expect(labels).not.toContain("Supersede");
686684
await screen.click("Back");
687685
expect(state.listInputs.at(-1)).not.toHaveProperty("includeSuperseded");
@@ -841,7 +839,7 @@ it("drops a revised fact from the selection and the draft after saving", async (
841839
});
842840
screen.openMemory();
843841
await screen.click(`Inspect fact: ${fact.content}`);
844-
await screen.click("Confirm");
842+
await screen.click("Helpful");
845843
expect(state.setText).toHaveBeenCalledWith(scope.draftKey, "");
846844
expect(screen.container.textContent).toContain("0 selected");
847845
expect(screen.container.textContent).toContain("removed from the draft");

‎apps/mobile/src/components/ProjectKnowledgeEntry.tsx‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ function ProjectKnowledgeSheet(
440440
<ScrollView
441441
className="flex-1"
442442
contentInsetAdjustmentBehavior="automatic"
443+
automaticallyAdjustKeyboardInsets
444+
keyboardDismissMode="on-drag"
443445
keyboardShouldPersistTaps="handled"
444446
contentContainerStyle={{ padding: 20, gap: 14 }}
445447
>
@@ -502,18 +504,17 @@ function ProjectKnowledgeSheet(
502504
if (inspectedFact.status !== "forgotten")
503505
push({ kind: "editor", mode: { kind, fact: inspectedFact } });
504506
}}
505-
onRevise={(action) => {
506-
const revise = () => void apply({ action, ...factMutation(inspectedFact) });
507-
if (action !== "forget") return revise();
507+
onForget={() =>
508508
Dialog.confirm({
509509
title: "Forget this fact permanently?",
510510
message:
511511
"Its content, history and every copy sent to agents are removed and cannot be restored. If the fact changed rather than became wrong, supersede it instead.",
512512
confirmText: "Forget",
513513
destructive: true,
514-
onConfirm: revise,
515-
});
516-
}}
514+
onConfirm: () =>
515+
void apply({ action: "forget", ...factMutation(inspectedFact) }),
516+
})
517+
}
517518
onFeedback={(helpful) =>
518519
void apply({ action: "feedback", helpful, ...factMutation(inspectedFact) })
519520
}

‎apps/mobile/src/components/ProjectKnowledgeFactDetail.tsx‎

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function ProjectFactInspector(props: {
126126
readonly onReadSource: (ref: KnowledgeMessageRef) => void;
127127
readonly onOpenFact: OpenFact;
128128
readonly onEdit: (mode: "edit" | "supersede") => void;
129-
readonly onRevise: (action: "confirm" | "forget") => void;
129+
readonly onForget: () => void;
130130
readonly onFeedback: (helpful: boolean) => void;
131131
readonly onDismissHints: () => void;
132132
}) {
@@ -162,13 +162,6 @@ export function ProjectFactInspector(props: {
162162
<AppText className="text-xs text-foreground-muted">
163163
Trust signal {fact.trust.toFixed(2)} · revision {fact.revision}
164164
</AppText>
165-
{fact.status === "proposed" &&
166-
fact.origin.kind === "assisted" &&
167-
fact.supersedes != null ? (
168-
<AppText className="text-xs">
169-
Confirming replaces fact {fact.supersedes.slice(0, 8)}; forgetting leaves it as it is.
170-
</AppText>
171-
) : null}
172165
</View>
173166

174167
<View className="gap-2">
@@ -202,14 +195,6 @@ export function ProjectFactInspector(props: {
202195

203196
{active ? (
204197
<View className="flex-row flex-wrap gap-2">
205-
{fact.status === "proposed" && !superseded ? (
206-
<Button
207-
label="Confirm"
208-
tone="secondary"
209-
disabled={!mutable}
210-
onPress={() => props.onRevise("confirm")}
211-
/>
212-
) : null}
213198
{!superseded ? (
214199
<Button
215200
label="Edit"
@@ -238,12 +223,7 @@ export function ProjectFactInspector(props: {
238223
disabled={!mutable}
239224
onPress={() => props.onFeedback(false)}
240225
/>
241-
<Button
242-
label="Forget"
243-
tone="danger"
244-
disabled={!mutable}
245-
onPress={() => props.onRevise("forget")}
246-
/>
226+
<Button label="Forget" tone="danger" disabled={!mutable} onPress={props.onForget} />
247227
</View>
248228
) : null}
249229
{!props.canMutate && active ? (
@@ -358,9 +338,9 @@ export function KnowledgeHealthRow(props: {
358338
return (
359339
<View className="gap-1">
360340
<AppText className="text-xs text-foreground-muted">
361-
{status.counts.confirmed} confirmed · {status.counts.proposed} proposed ·{" "}
362-
{status.counts.superseded} superseded · {status.belowRecallThreshold} below recall ·{" "}
363-
{status.feedback.helpful} helpful · {status.feedback.unhelpful} unhelpful
341+
{status.counts.saved} saved · {status.counts.superseded} superseded ·{" "}
342+
{status.belowRecallThreshold} below recall · {status.feedback.helpful} helpful ·{" "}
343+
{status.feedback.unhelpful} unhelpful
364344
</AppText>
365345
{lost > 0 ? (
366346
<Button

‎apps/mobile/src/components/ProjectKnowledgeFactList.tsx‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { KnowledgeHealthRow } from "./ProjectKnowledgeFactDetail";
3535
import { AppText, AppTextInput } from "./ui/AppText";
3636
import { Button } from "./ui/Button";
3737

38-
type StatusFilter = "confirmed" | "proposed" | "suggested" | "forgotten";
38+
type StatusFilter = "saved" | "automatic" | "forgotten";
3939

4040
/** Filters, search and paging for the fact list. The sheet reads its results for draft labels. */
4141
export function useProjectKnowledgeBrowse(props: {
@@ -44,7 +44,7 @@ export function useProjectKnowledgeBrowse(props: {
4444
readonly history: boolean;
4545
readonly onArchivedChange: () => void;
4646
}) {
47-
const [status, setStatus] = useState<StatusFilter>("confirmed");
47+
const [status, setStatus] = useState<StatusFilter>("saved");
4848
const [afterId, setAfterId] = useState<ProjectFactId | undefined>();
4949
const [includeArchived, setIncludeArchived] = useState(false);
5050
const [searchText, setSearchText] = useState("");
@@ -56,11 +56,10 @@ export function useProjectKnowledgeBrowse(props: {
5656
environmentId: props.environmentId,
5757
input: {
5858
projectId: props.projectId,
59-
// The lost-source filter spans proposed and confirmed, matching the health count.
6059
...(props.history && lostSourcesOnly
6160
? { sourceState: "unavailable" as const }
62-
: status === "suggested"
63-
? { status: "proposed" as const, origin: "assisted" as const }
61+
: status === "automatic"
62+
? { status: "saved" as const, origin: "assisted" as const }
6463
: { status }),
6564
...(afterId ? { afterId } : {}),
6665
...(props.history && showSuperseded ? { includeSuperseded: true } : {}),
@@ -214,7 +213,6 @@ export function ProjectKnowledgeFactList(props: {
214213
}) {
215214
const { browse } = props;
216215
const { list, health, search, searchInput } = browse;
217-
const suggested = health.data?.assistedLearning?.suggested;
218216
return (
219217
<View className="gap-4">
220218
<View className="gap-2">
@@ -243,12 +241,12 @@ export function ProjectKnowledgeFactList(props: {
243241

244242
<View className="flex-row flex-wrap gap-2">
245243
{(props.assisted
246-
? (["confirmed", "proposed", "suggested", "forgotten"] as const)
247-
: (["confirmed", "proposed", "forgotten"] as const)
244+
? (["saved", "automatic", "forgotten"] as const)
245+
: (["saved", "forgotten"] as const)
248246
).map((value) => (
249247
<Button
250248
key={value}
251-
label={value === "suggested" && suggested ? `suggested (${suggested})` : value}
249+
label={value}
252250
tone={
253251
browse.status === value && !searchInput && !browse.lostSourcesOnly
254252
? "primary"
@@ -427,7 +425,6 @@ function FactRow(props: {
427425
);
428426
}
429427

430-
/** The project's opt-in for model-suggested facts and what the last run did with it. */
431428
function AssistedLearningRow(props: {
432429
readonly environmentId: EnvironmentId;
433430
readonly projectId: ProjectId;
@@ -463,17 +460,17 @@ function AssistedLearningRow(props: {
463460
return (
464461
<View className="gap-1 rounded-2xl bg-subtle p-3">
465462
<View className="flex-row items-center gap-3">
466-
<AppText className="flex-1">Suggest facts from finished runs</AppText>
463+
<AppText className="flex-1">Save facts from finished runs</AppText>
467464
<Switch
468-
accessibilityLabel="Suggest facts from finished runs"
465+
accessibilityLabel="Save facts from finished runs"
469466
value={enabled}
470467
disabled={!canWrite || busy}
471468
onValueChange={(value) => void toggle(value)}
472469
/>
473470
</View>
474471
<AppText className="text-xs text-foreground-muted">
475-
After each run in this project, your text generation model proposes up to three cited facts
476-
for review. Each run costs one model call.
472+
After each run in this project, your text generation model saves up to three cited facts.
473+
Each run costs one model call.
477474
</AppText>
478475
{props.lastRun ? (
479476
<AppText className="text-xs">{assistedLearningRunLabel(props.lastRun)}</AppText>

‎apps/mobile/src/features/home/HomeScreen.tsx‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ import { SwipeableScrollGateProvider, useSwipeableScrollGate } from "./thread-sw
8989
import { useFabScroll } from "./FabScrollContext";
9090
import { useWorkspaceTabs } from "../layout/workspace/WorkspaceTabsContext";
9191
import { ThreadListFilters } from "./ThreadListFilters";
92-
import { ProjectLoomEntry } from "../loom/ProjectLoomEntry";
9392

9493
interface HomeScreenProps {
9594
readonly projects: ReadonlyArray<EnvironmentProject>;
@@ -671,15 +670,10 @@ export function HomeScreen(props: HomeScreenProps) {
671670
catalogState: props.catalogState,
672671
projectCount: props.projects.length,
673672
});
674-
const loomProjects = props.projects.filter(
675-
(project) =>
676-
props.selectedEnvironmentId === null || project.environmentId === props.selectedEnvironmentId,
677-
);
678673

679674
if (!hasAnyThreads) {
680675
return (
681676
<View className={containerClassName}>
682-
<ProjectLoomEntry projects={loomProjects} />
683677
<ScreenContent surface={sidebarSurface ? "drawer" : "screen"}>
684678
<View
685679
className={cn(
@@ -734,7 +728,6 @@ export function HomeScreen(props: HomeScreenProps) {
734728
const v2ListHeader = (
735729
<>
736730
{listHeader}
737-
<ProjectLoomEntry projects={loomProjects} />
738731
{Platform.OS === "ios" && workspace ? (
739732
<ThreadListFilters
740733
gutter={sidebarSurface ? 8 : 0}

‎apps/mobile/src/features/loom/ProjectLoomEntry.tsx‎

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)