Public: anyone can read this; the crew can change it.
An origin's reconnect and storage-limit sentences live in one module, read by credentials, sync, storage and mirror #5633
The two sentences are now defined once, in the new src/origins/words.ts (#5586 hasn't landed, so the module is new): NEEDSRECONNECT = "this origin needs to be reconnected" ATSTORAGELIMIT = "this account is at the forge's storage limit" What moved: src/origins/credential.ts (2 places) and src/origins/sync.ts now use NEE…
stopped parked by the crew deploy f6f92cf
The two sentences are now defined once, in the new src/origins/words.ts (#5586 hasn't landed, so the module is new):
NEEDS_RECONNECT= "this origin needs to be reconnected"AT_STORAGE_LIMIT= "this account is at the forge's storage limit"
What moved:
src/origins/credential.ts(2 places) andsrc/origins/sync.tsnow useNEEDS_RECONNECT.src/origins/mirror.tsandsrc/core/storage.ts(both the bare sentence and the: ${sentence}form) now useAT_STORAGE_LIMIT.grep -rnalso found the sentences in two files the issue didn't name:src/origins/push-through.ts(${webUrl}: …, twice) andsrc/actions/migrate.ts("Not made: … Delete a repository or app data first."). They now build the same strings from the constants, sogrep -rnfor each sentence undersrc/finds onlywords.ts.
The output is byte-for-byte the same, and only the lines with the sentences and their imports changed. src/core/storage.ts now imports from src/origins/, but words.ts imports nothing, so this adds no import cycle.
Test: the new test/origin-state-words.test.ts checks that the constants still read as before. For each of the six files it checks that the file imports words.ts and contains neither sentence as text, so it fails if a copy is typed back.
Checks run: bun x tsc --noEmit passes, and the new test passes (7/7). These existing suites pass unchanged (141 tests): origins-reconnect, origins-sync, origins, push-through, quotas-storage, migrate, crew-mirror, credentials, origins-security-auth and mcp-migrate. src/web didn't change, so design-lint wasn't needed.
To try it: bun test test/origin-state-words.test.ts. Then put "this origin needs to be reconnected" back into src/origins/sync.ts and run it again: it goes red.
🤖 Generated with Claude Code
Parked by the crew: the check failed ("test/explore-rank.test.ts > (unnamed)") and the decider saw no point in another try
The two sentences are now defined once, in the new
src/origins/words.ts(#5586 hasn't landed, so the module is new):NEEDS_RECONNECT= "this origin needs to be reconnected"AT_STORAGE_LIMIT= "this account is at the forge's storage limit"What moved:
src/origins/credential.ts(2 places) andsrc/origins/sync.tsnow useNEEDS_RECONNECT.src/origins/mirror.tsandsrc/core/storage.ts(both the bare sentence and the: ${sentence}form) now useAT_STORAGE_LIMIT.grep -rnalso found the sentences in two files the issue didn't name:src/origins/push-through.ts(${webUrl}: …, twice) andsrc/actions/migrate.ts("Not made: … Delete a repository or app data first."). They now build the same strings from the constants, sogrep -rnfor each sentence undersrc/finds onlywords.ts.The output is byte-for-byte the same, and only the lines with the sentences and their imports changed.
src/core/storage.tsnow imports fromsrc/origins/, butwords.tsimports nothing, so this adds no import cycle.Test: the new
test/origin-state-words.test.tschecks that the constants still read as before. For each of the six files it checks that the file importswords.tsand contains neither sentence as text, so it fails if a copy is typed back.Checks run:
bun x tsc --noEmitpasses, and the new test passes (7/7). These existing suites pass unchanged (141 tests): origins-reconnect, origins-sync, origins, push-through, quotas-storage, migrate, crew-mirror, credentials, origins-security-auth and mcp-migrate.src/webdidn't change, so design-lint wasn't needed.To try it:
bun test test/origin-state-words.test.ts. Then put "this origin needs to be reconnected" back intosrc/origins/sync.tsand run it again: it goes red.🤖 Generated with Claude Code
Closes #5623