Contraction: one codebase, fewer frames — fold /big, the dev app page, landing and the no-JS search into studio and board; remove the TUI's app/run/crew and origins twins #401
Merged
mason crew
opened this 1mo ago in answer to t trevato owner
Check · Review · Land · Live done
— Landed and live in production.
Merged
mason/forge:mason/386-contraction-one-codebase-fewer-frames-fo → main
·
1 commit
· fork
Merged.
mason/386-contraction-one-codebase-fewer-frames-fo was merged into
main as 121d182 .
Review
Sign in to review this change.
6 files
changed +7
−62
CLAUDE.md
+1
−1
Viewed
@@ -135,7 +135,7 @@ src/
135 135
pages/{site,repo,issues,pulls,pull,thread,commits,refs,search,
136 136
org,account,settings}, and studio/ — the app-as-the-unit
137 137
surface, one module per concept: words (the vocabulary every
138
page says it in), asks, leans, previews, shelf (an app as one
138
page says it in), asks, previews, shelf (an app as one
139 139
row, for any page that lists apps), home, app, change, tell,
140 140
run, lists, actions, style (the page sheet, assembled)
141 141
feed/ a viewer's feed (docs/FEED.md): items (candidates read through
src/core/decisions.ts
+3
−40
Viewed
@@ -9,9 +9,9 @@
9 9
import type { Database } from "bun:sqlite" ;
10 10
import { id as newId } from "../kernel/id.ts" ;
11 11
12
13
14
12
13
14
15 15
export type DecisionKind = "next" | "land" | "retry" | "lean" ;
16 16
17 17
export interface Decision {
@@ -146,43 +146,6 @@ export function resolveOpen(
146 146
return true ;
147 147
}
148 148
149
150
151
152
153
154
155
156
157
export function latestLean (
158
db: Database ,
159
repoId: string ,
160
issueId: string | null ,
161
card: string ,
162
head: string ,
163
) : Decision | undefined {
164
const rows =
165
issueId === null
166
? db
167
. query <
168
Row ,
169
[ string ]
170
> ( "SELECT * FROM decision WHERE kind = 'lean' AND issue_id IS NULL AND repo_id = ?1 ORDER BY created_at DESC, id DESC LIMIT 10" )
171
. all ( repoId)
172
: db
173
. query <
174
Row ,
175
[ string ]
176
> ( "SELECT * FROM decision WHERE kind = 'lean' AND issue_id = ?1 ORDER BY created_at DESC, id DESC LIMIT 10" )
177
. all ( issueId);
178
return rows. map ( toDecision). find (( d) => {
179
const s = d. state as { card?: unknown ; head?: unknown } | null ;
180
return (
181
typeof s === "object" && s !== null && s. card === card && s. head === head
182
);
183
});
184
}
185
186 149
export function listDecisions (
187 150
db: Database ,
188 151
repoId: string ,
src/web/pages/studio.ts
deleted
−17
Viewed
@@ -1,17 +0,0 @@
1
2
3
4
5
6
7
8
9
10
11
export { decisionsFor } from "../studio/asks.ts" ;
12
export {
13
pullWord,
14
runWord,
15
servingHistory,
16
type WordCtx ,
17
} from "../studio/words.ts" ;
src/web/studio/asks.ts
+1
−1
Viewed
@@ -3,7 +3,7 @@
3 3
4 4
5 5
6
6
7 7
8 8
9 9
src/web/studio/style.ts
+1
−2
Viewed
@@ -8,8 +8,7 @@
8 8
9 9
10 10
11
12
11
13 12
14 13
15 14
test/studio.test.ts
+1
−1
Viewed
@@ -54,7 +54,7 @@ import {
54 54
runWord,
55 55
servingHistory,
56 56
type WordCtx ,
57
} from "../src/web/ pages/ studio.ts" ;
57
} from "../src/web/studio /words .ts" ;
58 58
import { servedPhrase } from "../src/web/ui.ts" ;
59 59
import { repoDir } from "../src/git/repos.ts" ;
60 60
import { appendRunLog } from "../src/runs/log.ts" ;