diff --git a/doc/architecture/blueprints/rapid_diffs/index.md b/doc/architecture/blueprints/rapid_diffs/index.md index cdec444f79417717dd9269f9221d864b220c6143..ee3758d8b1a5e46d9e24ce1695009dd0bd7aa236 100644 --- a/doc/architecture/blueprints/rapid_diffs/index.md +++ b/doc/architecture/blueprints/rapid_diffs/index.md @@ -336,6 +336,51 @@ sequenceDiagram end ``` +- Future files rendered and streamed to the front end + +```mermaid +sequenceDiagram + participant Client + participant Back end + participant Authorization + participant HAML + participant Cache + participant Database + participant Diff storage + participant Gitaly + + Client ->> Back end: Stream request + Back end ->> Authorization: Check is good request + alt All the possible unhappy paths + Authorization ->> Back end: No! + Back end ->> Client: 403 + else + Authorization ->> Back end: Authorized. + alt MR Diff + Back end ->> Database: Get files + Database ->> Back end: Files + Back end ->> Diff storage: Get diffs + Diff storage ->> Back end: Diffs + else + Back end ->> Gitaly: Get diffs + Gitaly ->> Back end: Diffs + end + loop Iterate through each diff file + Back end ->> HAML: Render diff file + HAML ->> Cache: Give me the cached rendered UI per file + alt Cache miss + Cache ->> HAML: Nada! + HAML ->> Cache: Cache rendered UI per file + Cache ->> HAML: Cached, rendered UI per file + else + Cache ->> HAML: Cached, rendered UI per file + end + HAML ->> Back end: Rendered UI + end + Back end ->> Client: Stream rendered UI per file + end +``` + ### Accessibility Reusable Rapid Diffs should be displayed in a way that is compliant with [Web Content Accessibility Guidelines 2.1](https://www.w3.org/TR/WCAG21/) level AA for web-based content and [Authoring Tool Accessibility Guidelines 2.0](https://www.w3.org/TR/ATAG20/) level AA for user interface.