web: fork a repository from the browser !282

merged merged by cmc on 2026-09-06 17:44 UTC · krz/gitbay:feat-174-fork-web into main

Discussion

cmc

repo fork was CLI-only, so #168's source picker had nothing to offer anyone who had not already forked from a terminal.

The repository header gets a Fork control next to Pin and Watch, posting to /{owner}/{repo}/fork. The command decides everything — read access, quota, name collision — and its message comes back on the page. That needed a flash slot on the repo home, which treePage did not have; without it a refusal was silent.

repo fork's payload becomes control.ForkOut so the handler can send the person to the new repository rather than re-deriving its path.

TestForkWeb runs the whole browser path: fork, edit a file in the fork with the web editor, see the fork's branch offered on the parent's merge request form, open it, and check a second fork reports the name collision instead of failing quietly.

Stacked on !280 — the source picker is what makes the last two steps work. Parity gains a fork row; it had none.

Closes #174

retargeted from feat-168-mr-from-fork-web to main: !280 merged

2026-09-06 16:53 UTC