.gitbay/wiki/Parity.org

0caaaedf8fa3d930b6b4fb83e249b1e0e3265c0a
gitbay/.gitbay/wiki/Parity.org rendered · source · history · blame · raw

349 lines · 17308 bytes

  1#+title: Parity
  2
  3Which surface can do what. The CLI is meant to be the complete
  4interface: every capability exists over SSH, and the other surfaces
  5dispatch the same control commands rather than reimplementing them, so
  6they cannot drift. This page is updated in the merge request that
  7changes a row.
  8
  9Three surfaces now: the CLI over SSH, the web, and the iOS client
 10(krz/gitbay-ios). A =no= in the cli column is a defect, not a
 11preference — it means some surface reached around the registry and
 12stranded a capability where only it can reach.
 13
 14* Rule
 15
 16A capability lands over SSH first. If it belongs to the
 17triage/review/respond loop, it lands on the web in the same merge
 18request. Anything whose input is a credential — secrets, mirror
 19tokens, API tokens — stays SSH-only by design: the web dispatcher
 20refuses =SSHOnly= commands outright. Session minting is not one of
 21them: what a browser submits to ask for a login link is a username or
 22an address, and the credential it gets back travels by mail.
 23
 24Rows are one page or one action each. Grouped rows hide gaps, twice
 25now: "browse, log, blame, search" read as covered while blame had no
 26command at all, and "build list, log" read as covered while the job
 27list a trigger can name had none (krz/gitbay#50), leaving the picker
 28browser-only and the iOS build screen unable to say more than the log.
 29
 30* Merge requests
 31
 32| capability             | cli | web | ios |
 33|------------------------+-----+-----+-----|
 34| read, diff, commits    | yes | yes | yes |
 35| review and check times | yes | yes | yes |
 36| who resolved it, when  | yes | yes | yes |
 37| comment                | yes | yes | yes |
 38| edit title and body    | yes | yes | yes |
 39| review (approve etc.)  | yes | yes | yes |
 40| resolve a thread       | yes | yes | yes |
 41| comment on a diff line | yes | yes | yes |
 42| merge (all strategies) | yes | yes | yes |
 43| close                  | yes | yes | yes |
 44| create                 | yes | yes | yes |
 45| draft, ready           | yes | yes | yes |
 46| search title and body  | yes | yes | yes |
 47| create from a fork     | yes | yes | yes |
 48| retarget               | yes | yes | yes |
 49| milestone              | yes | yes | yes |
 50| request a review       | yes | yes | yes |
 51| choose body markup     | yes | yes | yes |
 52| stacked merge requests | yes | yes | yes |
 53| revisions              | yes | yes | yes |
 54| range-diff             | yes | no  | yes |
 55
 56Reviews and checks carry the time they last said something, and a
 57=ci/<job>= check carries how long its build ran, so a merge request
 58reads without opening the build. Statuses posted through =status set=
 59have no build and report only the time. A merged or closed merge
 60request names who resolved it and when; a row without that stamp — a
 61=migrate= import, or one merged before krz/gitbay!137 with no
 62=mr.merged= event to backfill from — says neither rather than
 63inventing a time.
 64
 65A merge request whose target is another open merge request's source
 66branch is stacked on it: =mr show= and the page say so both ways, and
 67when the lower one merges, everything stacked on it is retargeted onto
 68what it merged into with its reviews kept. A squash or rebase merge is
 69refused while anything is stacked on the merge request, since it would
 70rewrite the commits the stack builds on. All three surfaces show the
 71stack both ways.
 72
 73A draft merge request is open but not asking: it does not merge, and it
 74does not appear in anyone's review queue. Draft is a flag rather than a
 75fifth state, so every =state = 'open'= rule still means what it did.
 76=mr revisions= lists the heads a merge request has had; the web page
 77lists them beside the reviews they staled, and the iOS client has a
 78Revisions section. =mr range-diff= compares two heads: the iOS client
 79shows it from a revision to the one before, as text; the web has no
 80view. Batched review is not built.
 81
 82=mr review request --add <user>= asks a *particular* person, who then
 83carries the merge request in their queue and is notified; =--remove=
 84withdraws the ask. Without one the queue is computed from involvement —
 85what you own, are granted, or reach through an org or team — so a
 86collaborator with write access who has not touched a thread hears
 87nothing until they do (krz/gitbay#145).
 88
 89Creating from a fork works anywhere the source can be typed as
 90=owner/name:branch=. The web's source picker offers the branches of
 91every fork the viewer can push to in that form, and the repository
 92header has the fork control, so the whole path — fork, edit a file,
 93propose — runs in a browser. Retargeting moves an open
 94merge request onto another branch of the same repository and stales the
 95reviews, since an approval was of the diff against the old branch.
 96
 97* Issues
 98
 99| capability          | cli | web | ios |
100|---------------------+-----+-----+-----|
101| read, list, filter  | yes | yes | yes |
102| filter by label, assignee, author, milestone | yes | yes | yes |
103| search title and body | yes | yes | yes |
104| create              | yes | yes | yes |
105| comment             | yes | yes | yes |
106| edit title and body | yes | yes | yes |
107| close and reopen    | yes | yes | yes |
108| labels, assignees   | yes | yes | yes |
109| milestone           | yes | yes | yes |
110| milestone list      | yes | yes | yes |
111| labels: list, colour | yes | yes | yes |
112| choose body markup  | yes | yes | yes |
113| issue templates     | yes | yes | yes |
114| milestone create, close, reopen | yes | no | yes |
115
116Labels are created on the fly by =issue label --add= and managed by
117=label list=, =label set <label> --color rrggbb= and =label remove=,
118which takes the label off every issue. The web paints the stored colour
119on every chip and derives one from the name when none is set. The set
120itself is at =/<owner>/<repo>/labels=, linked from the issue list:
121create, recolour and remove, dispatching the same commands.
122
123Issue, MR and release bodies, and their comments, carry the markup they
124were written in — =--format md|org= on create, comment and edit, stored
125alongside the text so changing a preference later cannot reinterpret
126prose that already exists. Every surface *renders* the stored format, and
127every surface now offers the choice: the web's create forms, and the iOS
128composer on create, edit and comment. An edit starts on the format its
129body was stored in, since starting elsewhere would silently reinterpret
130it on the next save. Diff-line comments have no format column and are
131always markdown.
132
133* Repositories
134
135| capability                  | cli | web | ios |
136|-----------------------------+-----+-----+-----|
137| browse files                | yes | yes | yes |
138| read a file                 | yes | yes | yes |
139| commit log                  | yes | yes | yes |
140| commit log at a ref         | yes | yes | yes |
141| one commit with its patch   | yes | yes | yes |
142| blame                       | yes | yes | yes |
143| search file contents        | yes | yes | yes |
144| compare two refs            | yes | yes | yes |
145| branches and tags           | yes | yes | yes |
146| wiki (read)                 | yes | yes | yes |
147| download an archive         | yes | yes | n/a |
148| edit a file                 | yes | yes | yes |
149| create                      | yes | yes | yes |
150| fork                        | yes | yes | yes |
151| pin                         | yes | yes | yes |
152| bookmark                    | yes | yes | yes |
153| bookmark list               | yes | yes | yes |
154| watch, unwatch              | yes | yes | yes |
155| mute                        | yes | no  | yes |
156| settings, protection        | yes | yes | yes |
157| require codeowners          | yes | yes | yes |
158| access grants               | yes | no  | yes |
159| webhooks                    | yes | no  | yes |
160| import from a remote        | yes | no  | yes |
161| topics, website             | yes | yes | yes |
162| visibility                  | yes | yes | yes |
163| archive (read-only flag)    | yes | yes | yes |
164| release list, show          | yes | yes | yes |
165| release create, edit        | yes | yes | yes |
166| build list                  | yes | yes | yes |
167| build show (one build)      | yes | yes | yes |
168| build log                   | yes | yes | yes |
169| build jobs                  | yes | yes | yes |
170| build trigger               | yes | yes | yes |
171| build cancel                | yes | yes | yes |
172| job image (ci.yml)          | yes | n/a | n/a |
173| dependency checks on/off    | yes | yes | yes |
174| dependency status           | yes | yes | yes |
175| delete, transfer            | yes | no  | no  |
176| release delete              | yes | yes | yes |
177| release asset add           | yes | no  | n/a |
178| release asset remove        | yes | no  | yes |
179
180No row is web-only any more. Blame, file editing, log at a ref,
181archive, the public listing and the wiki were all in that state — a
182handler reading git or the store directly instead of dispatching a
183command — until krz/gitbay!99, !101 and !102 gave them commands.
184
185=build cancel= withdraws a queued build, or ends a running one: the
186server closes the runner's log session and the runner kills the step
187within a couple of seconds. Cancelling a duplicate of a commit that
188already passed the job puts that result back on the commit. The build
189page carries the button while a build is still cancellable.
190
191A pin and a bookmark are different things and are stored separately. A
192pin is private quick access to what you are working on, and drives the
193rail; a bookmark is public, says a repository is worth coming back to,
194and its count is the only popularity signal on the instance. Bookmarking
195needs read access only — it is something you do to someone else's
196repository — and a repository bookmarked while public and since made
197private drops out of the listing rather than leaking that it exists
198(krz/gitbay#146).
199
200The web's watch and pin controls write the store directly instead of
201dispatching =repo watch= and =repo pin=. That is why the web cannot
202mute: its toggle knows watching and default only.
203
204Dependency checks are off until a repository's admin turns them on: the
205check tells a public registry what the repository depends on. =repo deps
206status= lists what is behind; the repository's settings page renders the
207same report under the toggle — last check, last error, the tracking
208issue, and the rows. The issue the worker opens, rewrites and closes is
209still the copy every other surface reads.
210
211The wiki row covers reading. A wiki lives at =.gitbay/wiki/= on the
212default branch, so editing one is editing a file in the repository —
213a push, or =repo commit-file= — and there is no wiki-specific edit row
214to have parity on. The web editor reaches it on any repository that
215permits server-authored commits; one requiring verified signatures
216does not, because the server signs nothing on a user's behalf, so
217those wikis are push-only.
218
219=n/a= marks a capability deliberately absent from a surface rather than
220missing from it. Archive download is =n/a= on iOS: the read API carries
221a command's stdout as a JSON string, so a gzip stream cannot survive it,
222and the app has nowhere useful to put a tarball — the brief rules out
223local git, so there is no clone, checkout or build to feed. The web's
224route stays the way to get one. =release asset add= is =n/a= on iOS for
225the same reason from the other direction: the file arrives on stdin,
226which the API carries as a JSON string.
227
228A README or wiki page's org renders per surface: the web through
229go-org, the iOS client through the shared OrgSwift package
230(=krz/org-swift=). OrgSwift is held to orgo's output by the
231=krz/org-conformance= corpus — golden renderings from orgo, itself
232diffed against Emacs =ox-html= — so constructs the iOS client used to
233approximate (tables, footnotes, timestamps, heading tags, nested lists)
234now render the way the reference does. go-org is not yet on the corpus.
235
236* Discovery
237
238| capability                       | cli | web | ios |
239|----------------------------------+-----+-----+-----|
240| search repositories              | yes | yes | yes |
241| search issues and merge requests | yes | yes | yes |
242| browse all public repositories   | yes | yes | yes |
243| profile page                     | yes | yes | yes |
244| profile about and links          | yes | yes | yes |
245| activity feed                    | yes | yes | yes |
246| command reference                | yes | no  | n/a |
247
248=explore= is the listing without a query; =repo search= is the one with.
249=search= is both plus the title and body of every issue and merge
250request the caller can read, over FTS5; the web serves it at =/search=
251with a field in the rail, and an anonymous visitor gets the public rows
252from the same query. =issue list --search= and =mr list --search= narrow
253one repository. What someone types is quoted term by term, so an FTS5
254operator — =c++=, =AND=, a lone quote — is a word to match and never a
255syntax error. =repo grep= remains the per-repository file-contents
256search.
257
258About text renders as markdown or org-mode per the =about_format= it
259was stored with. The iOS client decodes and renders both,
260through the same OrgSwift path a README takes.
261
262=help= lists the command registry. Bare it is an index, one line per
263command, sorted. With a prefix (=help mr=) it adds each command's
264argument syntax, which is the only place flags are written down;
265=gitbay <cmd> --help= asks the server for the same thing, and =--json=
266returns ={path, summary, usage}=. No web page renders it, and a native
267client has no use for one (krz/gitbay#57).
268
269* Accounts
270
271| capability                  | cli | web | ios |
272|-----------------------------+-----+-----+-----|
273| SSH keys: list, add, remove | yes | yes | yes |
274| PGP keys: list, add, remove | yes | yes | yes |
275| email add and verify        | yes | yes | yes |
276| email list, remove, primary | yes | yes | no  |
277| dashboard aggregate         | yes | yes | yes |
278| notification inbox          | yes | yes | yes |
279| API token mint              | yes | no  | no  |
280| account export bundle       | yes | yes | n/a |
281| profile set                 | yes | yes | yes |
282| request a login link        | n/a | yes | n/a |
283| account import bundle       | yes | no  | n/a |
284
285Notifications land in an inbox row per recipient whether or not the
286instance sends mail, and mail is the second half when SMTP is
287configured. =notifications list= reads it, unread by default;
288=notifications read <id>... | --all= clears it; the dashboard and the
289web rail carry the unread count. =repo watch= adds you to a
290repository's notifications, =repo mute= silences it, and =repo unwatch=
291returns you to the default from either — told about work you are part
292of, nothing more. A mute wins over owning the repository or having
293written the thread.
294
295A login link is requested from the login page by username or verified
296address, and arrives by mail: it works once and expires in fifteen
297minutes. The row is =n/a= for the CLI because a terminal with a
298registered key runs =web login=, which mints a link directly and needs
299no mail. It exists because an account with no SSH key had no way into
300the web at all (krz/gitbay#155). The page offers the form only when the
301instance has SMTP configured; there is no separate switch. The response
302never says whether the account exists. It is =n/a= on iOS for the same
303reason it is on the CLI, from the other end: the app authenticates with
304a bearer token pasted at sign-in, so a one-time link into the web
305unlocks nothing it can use.
306
307The account export bundle is =n/a= on iOS on the archive-download
308argument above — a JSON bundle has nowhere useful to land on a phone,
309and the web route stays the way to get one.
310
311=profile set= carries description, website, about and links. It is not
312=SSHOnly= — nothing about a bio is a credential, and the JSON API runs
313it. The account settings page has the form, and so does the iOS client:
314=--link= replaces the whole set rather than appending, so a client sends
315every link it keeps on every save, and =--link ''= is how they are
316cleared.
317
318* Organizations
319
320| capability                | cli | web | ios |
321|---------------------------+-----+-----+-----|
322| read members and teams    | yes | yes | yes |
323| members add, remove, role | yes | yes | yes |
324| teams create, delete      | yes | yes | yes |
325| team members              | yes | yes | yes |
326| team repo grants          | yes | yes | yes |
327| create, rename            | yes | yes | yes |
328| delete                    | yes | n/a | n/a |
329| profile                   | yes | no  | yes |
330
331* Pagination
332
333=issue list=, =mr list=, =repo list=, and =feed= take =--limit <n>=
334and =--cursor <c>=. Cursors are opaque; each page carries the next
335one. Without the flags a list stays complete, so existing scripts are
336unchanged. The web pages the issue and merge request lists at fifty
337with the same cursors; iOS pages with them too.
338
339* SSH only, by design
340
341Build secrets, mirror configuration and tokens, custom domain claims,
342API token minting, web session listing and revocation, deploy keys,
343account and instance administration. Deleting or transferring a repository is also
344CLI-only, as is deleting an organization: each wants a typed
345confirmation, not a button.
346
347These are the only rows where a =no= is intended. Everywhere else a
348=no= is work outstanding, and =n/a= means a surface cannot usefully
349carry the capability at all — see the archive note above.