Public: anyone can read this; the crew can change it.

Opening a forge from a template records the template's commit in the forge's settings row #13237

Closed opened this
Closed without merging

A forge made from a template now stores the template's name and commit in its own record. /settings shows one line, from owner/name at , and forges not made from a template show nothing. I checked #13038 first.

Notes

stopped closed without shipping deploy e80b785

opened this

A forge made from a template now stores the template's name and commit in its own record. /settings shows one line, from owner/name at <short sha>, and forges not made from a template show nothing.

I checked #13038 first. It shows the template as a row but does not store it, so this change is not a duplicate. I did not read #13038's code to confirm that, so check this pull for overlap with it.

  • Recording: src/spawn/template_record.ts is new. It writes the template and commit into the forge's settings table and reads them back. src/actions/spawn.ts calls it when a forge is opened from a template.
  • Settings line: src/web/pages/account.ts renders the line from that record. If only one of the two values is stored, it shows nothing.
  • Tests: test/spawn-template-record.test.ts has four tests: spawn, read the record, read the settings line, and the no-template case. All four pass.
  • Checks: tsc and design-lint are clean. The tests that cover this change pass here; I did not run the whole suite, since the forge runs it on push.
  • Gate: the last gate.ts --fix still printed all three rule failures — the "both doors" and "before/after looks" rules, which my commit message answers, and the 100-column comment rule at template_record.ts:35. I rewrapped that comment but did not re-run the gate afterwards, so I don't know whether it passes now.
  • Left out:
    • There is no terminal screen and no docs/features page, since this is a single read-only line. The commit message says "No door".
    • There is no before/after screenshot request. The commit message says "No look".

To try it: make a forge from a template repository, sign in there and open /settings. The first line reads from owner/name at <short sha>.

🤖 Generated with Claude Code

Closes #13048

commented

A forge made from a template now stores the template's name and commit in its own record. /settings shows one line, from owner/name at <short sha>, and forges not made from a template show nothing.

I checked #13038 first. It shows the template as a row but does not store it, so this change is not a duplicate. I did not read #13038's code to confirm that, so check this pull for overlap with it.

  • Recording: src/spawn/template_record.ts is new. It writes the template and commit into the forge's settings table and reads them back. src/actions/spawn.ts calls it when a forge is opened from a template.
  • Settings line: src/web/pages/account.ts renders the line from that record. If only one of the two values is stored, it shows nothing.
  • Tests: test/spawn-template-record.test.ts has four tests: spawn, read the record, read the settings line, and the no-template case. All four pass.
  • Checks: tsc and design-lint are clean. The tests that cover this change pass here; I did not run the whole suite, since the forge runs it on push.
  • Gate: the last gate.ts --fix still printed all three rule failures — the "both doors" and "before/after looks" rules, which my commit message answers, and the 100-column comment rule at template_record.ts:35. I rewrapped that comment but did not re-run the gate afterwards, so I don't know whether it passes now.
  • Left out:
    • There is no terminal screen and no docs/features page, since this is a single read-only line. The commit message says "No door".
    • There is no before/after screenshot request. The commit message says "No look".

To try it: make a forge from a template repository, sign in there and open /settings. The first line reads from owner/name at <short sha>.

🤖 Generated with Claude Code

commented

Declined: already done on main in 552068348. #13064 landed this feature on main (the same files, src/spawn/template_record.ts and test/spawn-template-record.test.ts), and it also covers the parent's read and the terminal line. Its version records the template and commit in the spawn record (parent.json) rather than in a settings row, and shows <template> at <short sha> on the settings page. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m7fes3crjs0ytqw4g6wfmgc4

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs