proctolog 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +23 -0
- data/README.md +178 -0
- data/app/controllers/proctolog/acceptances_controller.rb +29 -0
- data/app/controllers/proctolog/application_controller.rb +32 -0
- data/app/controllers/proctolog/bursts_controller.rb +34 -0
- data/app/controllers/proctolog/choices_controller.rb +30 -0
- data/app/controllers/proctolog/code_reviews_controller.rb +26 -0
- data/app/controllers/proctolog/decisions_controller.rb +33 -0
- data/app/controllers/proctolog/entries_controller.rb +14 -0
- data/app/controllers/proctolog/evidence_controller.rb +23 -0
- data/app/controllers/proctolog/freshness_controller.rb +27 -0
- data/app/controllers/proctolog/good_to_go_controller.rb +29 -0
- data/app/controllers/proctolog/memberships_controller.rb +20 -0
- data/app/controllers/proctolog/mentions_controller.rb +16 -0
- data/app/controllers/proctolog/moments_controller.rb +26 -0
- data/app/controllers/proctolog/note_params.rb +24 -0
- data/app/controllers/proctolog/notes_controller.rb +56 -0
- data/app/controllers/proctolog/open_pull_requests_controller.rb +59 -0
- data/app/controllers/proctolog/pictures_controller.rb +27 -0
- data/app/controllers/proctolog/prompts_controller.rb +28 -0
- data/app/controllers/proctolog/pull_request_scoped.rb +21 -0
- data/app/controllers/proctolog/pull_requests_controller.rb +34 -0
- data/app/controllers/proctolog/put_away_controller.rb +19 -0
- data/app/controllers/proctolog/recordings_controller.rb +28 -0
- data/app/controllers/proctolog/rendered_pieces_controller.rb +11 -0
- data/app/controllers/proctolog/review_data_controller.rb +12 -0
- data/app/controllers/proctolog/rules_controller.rb +20 -0
- data/app/controllers/proctolog/scenario_notes_controller.rb +26 -0
- data/app/controllers/proctolog/scenario_scoped.rb +21 -0
- data/app/controllers/proctolog/scenarios_controller.rb +67 -0
- data/app/controllers/proctolog/sitting_servers_controller.rb +30 -0
- data/app/controllers/proctolog/waiting_controller.rb +14 -0
- data/app/controllers/proctolog/with_decisions.rb +28 -0
- data/app/helpers/proctolog/bursts_helper.rb +52 -0
- data/app/helpers/proctolog/decisions_helper.rb +102 -0
- data/app/helpers/proctolog/desk_helper.rb +61 -0
- data/app/helpers/proctolog/mentions_helper.rb +27 -0
- data/app/helpers/proctolog/open_pull_requests_helper.rb +31 -0
- data/app/helpers/proctolog/prompts_helper.rb +21 -0
- data/app/helpers/proctolog/pull_requests_helper.rb +67 -0
- data/app/helpers/proctolog/recordings_helper.rb +30 -0
- data/app/helpers/proctolog/rounds_helper.rb +27 -0
- data/app/helpers/proctolog/scenarios_helper.rb +123 -0
- data/app/helpers/proctolog/standings_helper.rb +80 -0
- data/app/jobs/proctolog/application_job.rb +8 -0
- data/app/jobs/proctolog/ask_for_release_job.rb +9 -0
- data/app/jobs/proctolog/fetch_pictures_ahead_job.rb +36 -0
- data/app/jobs/proctolog/prune_fresh_profiles_job.rb +9 -0
- data/app/jobs/proctolog/read_mentions_ahead_job.rb +12 -0
- data/app/models/proctolog/acceptance.rb +47 -0
- data/app/models/proctolog/app.rb +92 -0
- data/app/models/proctolog/browser.rb +42 -0
- data/app/models/proctolog/burst.rb +268 -0
- data/app/models/proctolog/burst_notices.rb +143 -0
- data/app/models/proctolog/chapters.rb +42 -0
- data/app/models/proctolog/check.rb +122 -0
- data/app/models/proctolog/choices.rb +112 -0
- data/app/models/proctolog/code_review.rb +251 -0
- data/app/models/proctolog/decision_record.rb +12 -0
- data/app/models/proctolog/decisions.rb +199 -0
- data/app/models/proctolog/description.rb +165 -0
- data/app/models/proctolog/difference.rb +138 -0
- data/app/models/proctolog/doctor.rb +127 -0
- data/app/models/proctolog/evidence.rb +29 -0
- data/app/models/proctolog/failure.rb +7 -0
- data/app/models/proctolog/focus.rb +48 -0
- data/app/models/proctolog/fresh_sitting.rb +35 -0
- data/app/models/proctolog/github.rb +353 -0
- data/app/models/proctolog/handover/brief.rb +138 -0
- data/app/models/proctolog/handover/layers.rb +128 -0
- data/app/models/proctolog/handover/places.rb +98 -0
- data/app/models/proctolog/handover/taken.rb +41 -0
- data/app/models/proctolog/handover/worklist.rb +35 -0
- data/app/models/proctolog/handover.rb +123 -0
- data/app/models/proctolog/housekeeping.rb +23 -0
- data/app/models/proctolog/kit.rb +36 -0
- data/app/models/proctolog/marks.rb +130 -0
- data/app/models/proctolog/membership.rb +91 -0
- data/app/models/proctolog/mentions.rb +117 -0
- data/app/models/proctolog/note.rb +94 -0
- data/app/models/proctolog/outside.rb +45 -0
- data/app/models/proctolog/overlay/brief.rb +52 -0
- data/app/models/proctolog/overlay/written.rb +33 -0
- data/app/models/proctolog/overlay.rb +87 -0
- data/app/models/proctolog/owner.rb +16 -0
- data/app/models/proctolog/pick.rb +47 -0
- data/app/models/proctolog/picture.rb +138 -0
- data/app/models/proctolog/pieces_rendering.rb +40 -0
- data/app/models/proctolog/project.rb +118 -0
- data/app/models/proctolog/pull_request.rb +89 -0
- data/app/models/proctolog/recording.rb +194 -0
- data/app/models/proctolog/release.rb +59 -0
- data/app/models/proctolog/rendering.rb +303 -0
- data/app/models/proctolog/reports.rb +66 -0
- data/app/models/proctolog/response_files.rb +55 -0
- data/app/models/proctolog/rounds.rb +305 -0
- data/app/models/proctolog/route.rb +151 -0
- data/app/models/proctolog/rules.rb +121 -0
- data/app/models/proctolog/scenario.rb +126 -0
- data/app/models/proctolog/server.rb +273 -0
- data/app/models/proctolog/since.rb +108 -0
- data/app/models/proctolog/size.rb +30 -0
- data/app/models/proctolog/standing.rb +132 -0
- data/app/models/proctolog/theme.rb +40 -0
- data/app/models/proctolog/unopened/numbers.rb +48 -0
- data/app/models/proctolog/unopened/opening.rb +88 -0
- data/app/models/proctolog/unopened.rb +203 -0
- data/app/models/proctolog/visit.rb +26 -0
- data/app/views/layouts/proctolog/application.html.erb +58 -0
- data/app/views/proctolog/acceptances/new.html.erb +34 -0
- data/app/views/proctolog/bursts/_line.html.erb +28 -0
- data/app/views/proctolog/bursts/_merged.html.erb +23 -0
- data/app/views/proctolog/bursts/_moved.html.erb +16 -0
- data/app/views/proctolog/bursts/_notices.html.erb +39 -0
- data/app/views/proctolog/bursts/_put_away.html.erb +11 -0
- data/app/views/proctolog/bursts/_rules.html.erb +27 -0
- data/app/views/proctolog/bursts/_side.html.erb +49 -0
- data/app/views/proctolog/bursts/_side_stop.html.erb +10 -0
- data/app/views/proctolog/bursts/show.html.erb +54 -0
- data/app/views/proctolog/code_reviews/show.html.erb +33 -0
- data/app/views/proctolog/decisions/_alternative.html.erb +5 -0
- data/app/views/proctolog/decisions/_beneath.html.erb +21 -0
- data/app/views/proctolog/decisions/_box.html.erb +27 -0
- data/app/views/proctolog/decisions/_choices.html.erb +9 -0
- data/app/views/proctolog/decisions/_draft_tools.html.erb +47 -0
- data/app/views/proctolog/decisions/_part.html.erb +61 -0
- data/app/views/proctolog/decisions/_round_data.html.erb +1 -0
- data/app/views/proctolog/decisions/_theme.html.erb +13 -0
- data/app/views/proctolog/decisions/index.html.erb +75 -0
- data/app/views/proctolog/notes/_card.html.erb +19 -0
- data/app/views/proctolog/notes/_template.html.erb +41 -0
- data/app/views/proctolog/open_pull_requests/_side.html.erb +30 -0
- data/app/views/proctolog/open_pull_requests/index.html.erb +106 -0
- data/app/views/proctolog/prompts/show.html.erb +41 -0
- data/app/views/proctolog/pull_requests/_connections.html.erb +65 -0
- data/app/views/proctolog/pull_requests/_finish.html.erb +42 -0
- data/app/views/proctolog/pull_requests/_margin.html.erb +33 -0
- data/app/views/proctolog/pull_requests/_note.html.erb +4 -0
- data/app/views/proctolog/pull_requests/_outline.html.erb +26 -0
- data/app/views/proctolog/pull_requests/_paragraphs.html.erb +9 -0
- data/app/views/proctolog/pull_requests/_scenarios.html.erb +16 -0
- data/app/views/proctolog/pull_requests/_since.html.erb +42 -0
- data/app/views/proctolog/pull_requests/_standing.html.erb +51 -0
- data/app/views/proctolog/pull_requests/_status.html.erb +5 -0
- data/app/views/proctolog/pull_requests/_try.html.erb +122 -0
- data/app/views/proctolog/pull_requests/show.html.erb +145 -0
- data/app/views/proctolog/recordings/_dialog.html.erb +26 -0
- data/app/views/proctolog/recordings/_list.html.erb +8 -0
- data/app/views/proctolog/recordings/_note.html.erb +22 -0
- data/app/views/proctolog/recordings/index.html.erb +33 -0
- data/app/views/proctolog/recordings/show.html.erb +118 -0
- data/app/views/proctolog/scenarios/_dialog.html.erb +22 -0
- data/app/views/proctolog/scenarios/_note.html.erb +18 -0
- data/app/views/proctolog/scenarios/_open.html.erb +9 -0
- data/app/views/proctolog/scenarios/_scenario.html.erb +48 -0
- data/app/views/proctolog/scenarios/_server.html.erb +20 -0
- data/app/views/proctolog/scenarios/index.html.erb +62 -0
- data/bin/proctolog +330 -0
- data/completions/_proctolog +143 -0
- data/config/application.rb +94 -0
- data/config/database.yml +16 -0
- data/config/environment.rb +6 -0
- data/config/initializers/grouse.rb +113 -0
- data/config/initializers/grouse_notes.rb +9 -0
- data/config/keys.yml +6 -0
- data/config/routes.rb +71 -0
- data/config/storage.yml +4 -0
- data/db/migrate/20261019213542_create_grouse_tables.grouse.rb +128 -0
- data/db/migrate/20261019213550_create_active_storage_tables.active_storage.rb +58 -0
- data/docs/manual/app.md +157 -0
- data/docs/manual/bursts.md +129 -0
- data/docs/manual/deciding.md +89 -0
- data/docs/manual/desk.png +0 -0
- data/docs/manual/films.md +20 -0
- data/docs/manual/handover.md +93 -0
- data/docs/manual/pr-format.md +75 -0
- data/docs/manual/reading.md +233 -0
- data/docs/manual/unopened.md +80 -0
- data/docs/manual/updates.md +55 -0
- data/lib/proctolog/installation.rb +125 -0
- data/lib/proctolog/version.rb +7 -0
- data/public/asking.js +50 -0
- data/public/code-review.js +40 -0
- data/public/cursor.js +292 -0
- data/public/decision-screenshots.js +97 -0
- data/public/decisions.css +949 -0
- data/public/decisions.js +1289 -0
- data/public/desk.css +582 -0
- data/public/desk.js +126 -0
- data/public/favicon.png +0 -0
- data/public/keys.js +228 -0
- data/public/mentions.js +389 -0
- data/public/messages.js +103 -0
- data/public/notes.js +731 -0
- data/public/pick.css +99 -0
- data/public/plaque.png +0 -0
- data/public/pr-number.js +11 -0
- data/public/prompt.css +46 -0
- data/public/prompt.js +16 -0
- data/public/pull_request.css +805 -0
- data/public/recording.css +379 -0
- data/public/recording.js +394 -0
- data/public/release.js +25 -0
- data/public/respond.css +260 -0
- data/public/respond.js +95 -0
- data/public/review-drafts.js +949 -0
- data/public/review-rounds.js +1447 -0
- data/public/scenarios.css +253 -0
- data/public/scenarios.js +36 -0
- data/public/schemas/proctolog-response-v1.json +101 -0
- data/public/side.js +133 -0
- data/public/standing.css +478 -0
- data/public/terminal-apl.svg +6 -0
- data/public/terminal-cuneiform.svg +3 -0
- data/public/terminal-grain-dots.svg +6 -0
- data/public/terminal-grain-weave.svg +6 -0
- data/public/terminal-grain-wedges.svg +6 -0
- data/public/terminal-shades.svg +3 -0
- data/public/terminal.css +4426 -0
- data/public/toast.js +26 -0
- data/public/try.js +124 -0
- data/public/viewer.js +808 -0
- data/public/words.js +81 -0
- data/skills/proctolog-handover/SKILL.md +77 -0
- data/skills/proctolog-pr-writing/SKILL.md +228 -0
- data/skills/proctolog-pr-writing/references/example-description.md +33 -0
- metadata +366 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<% content_for :title, "Bursts and pull requests" %>
|
|
2
|
+
<% content_for :side do %>
|
|
3
|
+
<%= render "side", bursts: @bursts, read_at: @read_at %>
|
|
4
|
+
<% end %>
|
|
5
|
+
<% content_for :head do %>
|
|
6
|
+
<link rel="stylesheet" href="/pick.css">
|
|
7
|
+
<% end %>
|
|
8
|
+
|
|
9
|
+
<header class="burst">
|
|
10
|
+
<h1>Bursts and pull requests</h1>
|
|
11
|
+
<p class="lede">
|
|
12
|
+
Pick what to review. A pull request opens alone, a stack opens whole, and the ones you tick open together.
|
|
13
|
+
GitHub read <%= tag.time read_at_in_words(@read_at), datetime: @read_at.iso8601 %> · <%= link_to "read again", open_pull_requests_path(fresh: 1) %>
|
|
14
|
+
</p>
|
|
15
|
+
</header>
|
|
16
|
+
|
|
17
|
+
<main class="route pick">
|
|
18
|
+
<% if @bursts.any? || @put_away.any? %>
|
|
19
|
+
<h2>Your bursts</h2>
|
|
20
|
+
<ol class="lines">
|
|
21
|
+
<% (@put_away_shown ? @bursts + @put_away : @bursts).each do |burst| %>
|
|
22
|
+
<li>
|
|
23
|
+
<p class="what"><%= link_to burst.name, burst_path(burst.slug), class: "title" %></p>
|
|
24
|
+
<p class="facts"><%= burst.slug %> · <%= burst.own? ? "yours" : "the repository's" %><%= put_away_in_words(burst) %></p>
|
|
25
|
+
</li>
|
|
26
|
+
<% end %>
|
|
27
|
+
</ol>
|
|
28
|
+
<% if @put_away.any? %>
|
|
29
|
+
<p class="hint">
|
|
30
|
+
<% if @put_away_shown %>
|
|
31
|
+
<%= link_to "Put them away again", open_pull_requests_path %>
|
|
32
|
+
<% else %>
|
|
33
|
+
<%= pluralize(@put_away.size, "burst") %> put away, finished or done with. <%= link_to "Show #{(@put_away.size == 1) ? "it" : "them"}", open_pull_requests_path(put_away: 1) %>
|
|
34
|
+
<% end %>
|
|
35
|
+
</p>
|
|
36
|
+
<% end %>
|
|
37
|
+
<% end %>
|
|
38
|
+
|
|
39
|
+
<% if @pick.empty? %>
|
|
40
|
+
<p class="lede">Nothing is open in <%= @repository %>.</p>
|
|
41
|
+
<% end %>
|
|
42
|
+
|
|
43
|
+
<% @pick.stacks.each do |stack| %>
|
|
44
|
+
<h2>Stack #<%= stack.number %>, <%= stack.pull_requests.size %> from the bottom up</h2>
|
|
45
|
+
<%= button_to "Review the stack", review_stack_path(stack.number), class: "quiet" %>
|
|
46
|
+
<ol class="lines">
|
|
47
|
+
<% stack.pull_requests.each do |pull_request| %>
|
|
48
|
+
<li>
|
|
49
|
+
<p class="what">
|
|
50
|
+
<%= link_to "##{pull_request.number}", pull_request.url, class: "number", target: "_blank", rel: "noopener" %>
|
|
51
|
+
<span class="title"><%= pull_request.title %></span>
|
|
52
|
+
</p>
|
|
53
|
+
<p class="facts"><%= pick_facts(@pick, pull_request) %></p>
|
|
54
|
+
<%= button_to "Review alone", alone_open_pull_request_path(pull_request.number), class: "quiet" %>
|
|
55
|
+
</li>
|
|
56
|
+
<% end %>
|
|
57
|
+
</ol>
|
|
58
|
+
<% end %>
|
|
59
|
+
|
|
60
|
+
<% if (loose = @pick.loose).any? %>
|
|
61
|
+
<h2><%= @pick.stacks.any? ? "In no stack" : "Pull requests" %></h2>
|
|
62
|
+
<%= form_with url: bursts_path, method: :post do |form| %>
|
|
63
|
+
<ol class="lines">
|
|
64
|
+
<% loose.each do |pull_request| %>
|
|
65
|
+
<li>
|
|
66
|
+
<p class="what">
|
|
67
|
+
<%= check_box_tag "tops[]", pull_request.number, false, id: "pick-#{pull_request.number}", aria: {label: "Review ##{pull_request.number} together with the others ticked"} %>
|
|
68
|
+
<%= link_to "##{pull_request.number}", pull_request.url, class: "number", target: "_blank", rel: "noopener" %>
|
|
69
|
+
<%= label_tag "pick-#{pull_request.number}", pull_request.title, class: "title" %>
|
|
70
|
+
</p>
|
|
71
|
+
<p class="facts"><%= pick_facts(@pick, pull_request) %></p>
|
|
72
|
+
<%= form.button "Review alone", formaction: alone_open_pull_request_path(pull_request.number), class: "quiet" %>
|
|
73
|
+
</li>
|
|
74
|
+
<% end %>
|
|
75
|
+
</ol>
|
|
76
|
+
<p class="together">
|
|
77
|
+
<%= form.label :slug, "Together, as" %>
|
|
78
|
+
<%= form.text_field :slug, placeholder: "named after the first one's branch", pattern: "[a-z0-9]+(-[a-z0-9]+)*", autocomplete: "off" %>
|
|
79
|
+
<%= form.button "Review the ticked together", class: "primary" %>
|
|
80
|
+
</p>
|
|
81
|
+
<p class="hint">A ticked pull request brings the chain under it, followed down by base branches.</p>
|
|
82
|
+
<% end %>
|
|
83
|
+
<% end %>
|
|
84
|
+
|
|
85
|
+
<% if @pick.unopened.any? %>
|
|
86
|
+
<h2>Not opened</h2>
|
|
87
|
+
<p class="hint">Branches of this Mac with a description written for them, which nobody has opened on GitHub yet. A burst names each by its branch, so it still holds once it is opened.</p>
|
|
88
|
+
<ol class="lines">
|
|
89
|
+
<% @pick.unopened.each do |pull_request| %>
|
|
90
|
+
<li>
|
|
91
|
+
<p class="what">
|
|
92
|
+
<span class="number">#<%= pull_request.number %></span>
|
|
93
|
+
<span class="title"><%= pull_request.title %></span>
|
|
94
|
+
</p>
|
|
95
|
+
<p class="facts"><%= unopened_facts(pull_request) %></p>
|
|
96
|
+
<div class="actions">
|
|
97
|
+
<%= button_to "Review alone", alone_open_pull_request_path(pull_request.number), class: "quiet" %>
|
|
98
|
+
<% if @pick.chained?(pull_request) %>
|
|
99
|
+
<%= button_to "Review the chain", chain_open_pull_request_path(pull_request.number), class: "quiet" %>
|
|
100
|
+
<% end %>
|
|
101
|
+
</div>
|
|
102
|
+
</li>
|
|
103
|
+
<% end %>
|
|
104
|
+
</ol>
|
|
105
|
+
<% end %>
|
|
106
|
+
</main>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<% content_for :title, "The prompt · #{@burst.name}" %>
|
|
2
|
+
<% content_for :head do %>
|
|
3
|
+
<link rel="stylesheet" href="/prompt.css">
|
|
4
|
+
<link rel="stylesheet" href="/respond.css">
|
|
5
|
+
<link rel="stylesheet" href="/decisions.css">
|
|
6
|
+
<script type="module" src="/prompt.js"></script>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% content_for :mode, mode_line("Returned work", "j k" => "move", "a" => "confirm", "q" => "answer or ask", "c" => "correction", "l" => "later", "e" => "handover") %>
|
|
9
|
+
<% content_for :keys do %>
|
|
10
|
+
<%= keys_group "Returned work", "j k" => "move", "Home End" => "first, last", "a" => "confirm", "q" => "answer or ask", "c" => "correction", "l" => "later", "d" => "its changes in Diffle" %>
|
|
11
|
+
<%= keys_group "Write", "⌘ Enter" => "save the reply", "Esc" => "close" %>
|
|
12
|
+
<%= keys_group "This burst", "e" => "handover" %>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
15
|
+
<header class="burst">
|
|
16
|
+
<h1>The prompt</h1>
|
|
17
|
+
<% if @handover.empty? %>
|
|
18
|
+
<p class="tally">Nothing waits for the agent: no choice, note or code comment of yours, and no unresolved thread on GitHub.</p>
|
|
19
|
+
<% else %>
|
|
20
|
+
<p class="tally"><%= handed_over(@handover).upcase_first %> would be handed over, from the bottom of the stack up.</p>
|
|
21
|
+
<% end %>
|
|
22
|
+
</header>
|
|
23
|
+
|
|
24
|
+
<%= render "proctolog/decisions/draft_tools", burst: @burst %>
|
|
25
|
+
<script type="application/json" id="decision-inventory"><%= raw json_escape(decision_inventory(@burst)) %></script>
|
|
26
|
+
<%= render "proctolog/decisions/round_data", burst: @burst %>
|
|
27
|
+
<section class="round-results" data-round-results aria-label="Agent responses"></section>
|
|
28
|
+
<pre class="handover" data-combined-handover></pre>
|
|
29
|
+
|
|
30
|
+
<% if @taken_in.any? %>
|
|
31
|
+
<p class="taken-in">An agent's report moved <%= pluralize(@taken_in.size, "note") %> to "addressed": <%= @taken_in.map(&:id).to_sentence %>. They are yours to confirm.</p>
|
|
32
|
+
<% end %>
|
|
33
|
+
|
|
34
|
+
<% @burst.reports.unreadable.each do |report| %>
|
|
35
|
+
<p class="unreadable">The report <code><%= report %></code> is not a list of entries, and was not taken in.</p>
|
|
36
|
+
<% end %>
|
|
37
|
+
|
|
38
|
+
<% @burst.reports.unmatched.each do |entry| %>
|
|
39
|
+
<p class="unreadable">The report <code><%= entry.report %></code> names <code><%= entry.note %></code>, which is no note of this burst. It was not taken in.</p>
|
|
40
|
+
<% end %>
|
|
41
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<%# locals: (burst:, route:, stop:) %>
|
|
2
|
+
<% shared = by_overlap(route.sharing_files_with(stop)) %>
|
|
3
|
+
<% named = route.named_by(stop) %>
|
|
4
|
+
|
|
5
|
+
<section class="connections" aria-label="How it connects">
|
|
6
|
+
<dl>
|
|
7
|
+
<div>
|
|
8
|
+
<dt>Rests on</dt>
|
|
9
|
+
<dd>
|
|
10
|
+
<% if (under = route.under(stop)) %>
|
|
11
|
+
<%= pull_request_link(burst, under) %>
|
|
12
|
+
<% else %>
|
|
13
|
+
the <code><%= stop.pull_request.base %></code> branch
|
|
14
|
+
<% end %>
|
|
15
|
+
</dd>
|
|
16
|
+
</div>
|
|
17
|
+
<div>
|
|
18
|
+
<dt>Rests on it</dt>
|
|
19
|
+
<dd>
|
|
20
|
+
<% if (over = route.over(stop)) %>
|
|
21
|
+
<%= pull_request_link(burst, over) %>
|
|
22
|
+
<% else %>
|
|
23
|
+
nothing
|
|
24
|
+
<% end %>
|
|
25
|
+
</dd>
|
|
26
|
+
</div>
|
|
27
|
+
<div>
|
|
28
|
+
<dt>Changes the same files as</dt>
|
|
29
|
+
<dd>
|
|
30
|
+
<% if shared.empty? %>
|
|
31
|
+
no other pull request
|
|
32
|
+
<% else %>
|
|
33
|
+
<ul class="sharing">
|
|
34
|
+
<% shared.each do |other, files| %>
|
|
35
|
+
<li>
|
|
36
|
+
<details>
|
|
37
|
+
<summary><%= pull_request_link(burst, other) %> <span class="count"><%= pluralize(files.size, "file") %></span></summary>
|
|
38
|
+
<ul class="files">
|
|
39
|
+
<% files.each do |file| %>
|
|
40
|
+
<li><code><%= file %></code></li>
|
|
41
|
+
<% end %>
|
|
42
|
+
</ul>
|
|
43
|
+
</details>
|
|
44
|
+
</li>
|
|
45
|
+
<% end %>
|
|
46
|
+
</ul>
|
|
47
|
+
<% end %>
|
|
48
|
+
</dd>
|
|
49
|
+
</div>
|
|
50
|
+
<div>
|
|
51
|
+
<dt>Names</dt>
|
|
52
|
+
<dd>
|
|
53
|
+
<% if named.empty? %>
|
|
54
|
+
no other pull request
|
|
55
|
+
<% else %>
|
|
56
|
+
<ul class="named">
|
|
57
|
+
<% named.each do |other| %>
|
|
58
|
+
<li><%= pull_request_link(burst, other) %></li>
|
|
59
|
+
<% end %>
|
|
60
|
+
</ul>
|
|
61
|
+
<% end %>
|
|
62
|
+
</dd>
|
|
63
|
+
</div>
|
|
64
|
+
</dl>
|
|
65
|
+
</section>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<%# Where a pull request's decisions end: what is reviewed, what to do next, each by its key, and alone on the page every decision on a line under its grade, which the script marks with what was chosen or what holds it. A line unfolds to the decision's own words and the choice in full. j and k go down the lines, → and ← unfold and fold one, and Enter opens it to decide. Under the page the decisions themselves are just above, so the lines stay away. %>
|
|
2
|
+
<% graded = boxes.any? { !it.decision.blocking? } %>
|
|
3
|
+
<div class="finish" data-finish data-desk tabindex="-1" hidden>
|
|
4
|
+
<p><strong data-finish-said>Every decision of this pull request is reviewed.</strong></p>
|
|
5
|
+
<p class="actions">
|
|
6
|
+
<% if !standing.good_to_go? || standing.changed? %>
|
|
7
|
+
<button type="button" class="quiet" data-finish-good>Good to go <kbd>g</kbd></button>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% if next_to_review %>
|
|
10
|
+
<%= link_to burst_pull_request_path(burst, next_to_review.number), title: next_to_review.title do %>Next to review #<%= next_to_review.number %> <kbd>N</kbd><% end %>
|
|
11
|
+
<% elsif later %>
|
|
12
|
+
<%= link_to burst_pull_request_path(burst, later.number), title: later.title do %>#<%= later.number %> → <kbd>J</kbd><% end %>
|
|
13
|
+
<% end %>
|
|
14
|
+
<button type="button" class="quiet" data-finish-handover>Hand over <kbd>e</kbd></button>
|
|
15
|
+
<%= link_to burst_path(burst, anchor: "pr-#{stop.number}") do %>Route <kbd>h</kbd><% end %>
|
|
16
|
+
</p>
|
|
17
|
+
<% boxes.group_by { it.decision.grade }.each do |grade, of_grade| %>
|
|
18
|
+
<section class="grade">
|
|
19
|
+
<h3><%= graded ? grade_named(grade).name : "Decisions" %> <span class="count" data-grade-count></span></h3>
|
|
20
|
+
<% if graded %>
|
|
21
|
+
<p class="meaning"><%= grade_named(grade).meaning %></p>
|
|
22
|
+
<% end %>
|
|
23
|
+
<% unless grade == :blocking %>
|
|
24
|
+
<p class="leave" data-finish-leave hidden>
|
|
25
|
+
<button type="button" class="quiet" data-leave-non-blocking data-pr="<%= stop.number %>" hidden><kbd>A</kbd> <span data-leave-said></span></button>
|
|
26
|
+
<span data-held-said></span>
|
|
27
|
+
</p>
|
|
28
|
+
<% end %>
|
|
29
|
+
<ol class="lines">
|
|
30
|
+
<% of_grade.each do |box| %>
|
|
31
|
+
<%= tag.li tabindex: -1, aria: {expanded: false}, data: {line_of: box.to_param, reading: ""} do %>
|
|
32
|
+
<span class="bead" aria-hidden="true"></span><span class="lead"><%= box.plain_lead %></span><span class="said" data-line-said></span>
|
|
33
|
+
<div class="more">
|
|
34
|
+
<div class="words"><%= raw decision_html(box, burst) %></div>
|
|
35
|
+
<p class="choice" data-line-choice></p>
|
|
36
|
+
</div>
|
|
37
|
+
<% end %>
|
|
38
|
+
<% end %>
|
|
39
|
+
</ol>
|
|
40
|
+
</section>
|
|
41
|
+
<% end %>
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<%# locals: (rendering:, burst:, stop:) %>
|
|
2
|
+
<aside class="margin" aria-label="Notes">
|
|
3
|
+
<% if rendering.about.any? %>
|
|
4
|
+
<h3>On the whole pull request</h3>
|
|
5
|
+
<ol class="cards">
|
|
6
|
+
<% rendering.about.each do |note| %>
|
|
7
|
+
<%= render "note", note:, rendering:, burst:, stop: %>
|
|
8
|
+
<% end %>
|
|
9
|
+
</ol>
|
|
10
|
+
<% end %>
|
|
11
|
+
|
|
12
|
+
<% if rendering.margin.any? %>
|
|
13
|
+
<h3>On the description</h3>
|
|
14
|
+
<ol class="cards">
|
|
15
|
+
<% rendering.margin.each do |note| %>
|
|
16
|
+
<%= render "note", note:, rendering:, burst:, stop: %>
|
|
17
|
+
<% end %>
|
|
18
|
+
</ol>
|
|
19
|
+
<% elsif rendering.about.none? %>
|
|
20
|
+
<p class="empty">No notes yet. Select some words, press the + beside a block, or drag across a picture.</p>
|
|
21
|
+
<% end %>
|
|
22
|
+
|
|
23
|
+
<% if rendering.set_aside.any? %>
|
|
24
|
+
<details class="set-aside">
|
|
25
|
+
<summary>Put away <span class="count"><%= rendering.set_aside.size %></span></summary>
|
|
26
|
+
<ol class="cards">
|
|
27
|
+
<% rendering.set_aside.each do |note| %>
|
|
28
|
+
<%= render "note", note:, rendering:, burst:, stop: %>
|
|
29
|
+
<% end %>
|
|
30
|
+
</ol>
|
|
31
|
+
</details>
|
|
32
|
+
<% end %>
|
|
33
|
+
</aside>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<%# locals: (note:, rendering:, burst:, stop:) %>
|
|
2
|
+
<%# A note with a mark on the page is found by its mark; one without is found by its card. The card keeps the words as written, for the picture viewer to open the note again. %>
|
|
3
|
+
<%= render "proctolog/notes/card", note:, burst:, stop:, where: place_of(note, rendering),
|
|
4
|
+
attributes: {id: ("note-#{note.id}" unless rendering.margin.include?(note)), data: {card: note.id, text: note.text}} %>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<%# locals: (rendering:, standing:, scenarios:, open_notes:, burst:, code:) %>
|
|
2
|
+
<%# The outline beside the page: its sections in the page's own order, the one the reading is in marked by the script, and a count only where something waits for the owner (the pictures of Screenshots are the one count that merely informs). A press goes to the section. The script pairs each line with a section of the page by its place, so the two lists keep the same order. data-desk keeps it out of the reading order. %>
|
|
3
|
+
<nav class="outline" aria-label="In this pull request" data-outline data-desk>
|
|
4
|
+
<% rendering.sections.each do |section| %>
|
|
5
|
+
<% if section.heading == Proctolog::Description::DECISIONS %>
|
|
6
|
+
<%= outline_line "Decisions", waits_for: "decisions" %>
|
|
7
|
+
<% elsif section.heading == "Screenshots" %>
|
|
8
|
+
<%= outline_line section.heading, count: section.figures.size %>
|
|
9
|
+
<% else %>
|
|
10
|
+
<%= outline_line section.heading || "Opening" %>
|
|
11
|
+
<% end %>
|
|
12
|
+
<% end %>
|
|
13
|
+
<%= outline_line "Standing", count: "#{standing.judged.count(&:met)}/#{standing.judged.size}", waits: standing.judged.any? { !it.met }, apart: true %>
|
|
14
|
+
<%# Scenarios are counted, but never wait for the owner: a pull request can go without them. %>
|
|
15
|
+
<% if scenarios.any? %>
|
|
16
|
+
<% seen = scenarios.count { standing.marks.scenarios.dig(it.name, "head") == standing.stop.head_oid } %>
|
|
17
|
+
<%= outline_line "Scenarios", count: "#{seen}/#{scenarios.size}" %>
|
|
18
|
+
<% end %>
|
|
19
|
+
<%= outline_line "Connections" %>
|
|
20
|
+
<%= outline_line "Notes", count: open_notes.nonzero?, waits: true %>
|
|
21
|
+
<%= outline_line "Handover" %>
|
|
22
|
+
<%# What Diffle holds of it: the comments nobody resolved, which wait for the handover, and the files marked viewed once code has opened. Diffle goes on in a tab of its own, so code-review.js asks again whenever the owner comes back to this one. Both lines go to the Code comments page. %>
|
|
23
|
+
<% comments = burst_pull_request_code_review_path(burst, standing.stop.number) %>
|
|
24
|
+
<%= outline_line "Code comments", to: comments, count: code.open.nonzero?, waits: true, apart: true, data: {code_tally: burst_pull_request_code_review_path(burst, standing.stop.number, format: :json)} %>
|
|
25
|
+
<%= outline_line "Files viewed", to: comments, count: ("#{code.viewed}/#{code.files}" if code.files), hidden: code.files.nil?, data: {files_viewed: ""} %>
|
|
26
|
+
</nav>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (kind:, paragraphs:) %>
|
|
2
|
+
<% if paragraphs.any? %>
|
|
3
|
+
<%= tag.details class: ["paragraphs", kind], open: paragraphs.size <= 12 do %>
|
|
4
|
+
<summary><%= pluralize(paragraphs.size, "paragraph") %> <%= kind %></summary>
|
|
5
|
+
<% paragraphs.each do |text| %>
|
|
6
|
+
<pre><%= text %></pre>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<%# locals: (stop:, scenarios:, marks:, burst:) %>
|
|
2
|
+
<%# What each scenario asks, and what was seen of it. Try it, beside the page, starts the app and sets each one up. A press on one of the buttons comes back here with a message: open on it, so the message is seen. %>
|
|
3
|
+
<% seen = scenarios.count { marks.scenarios.dig(it.name, "head") == stop.head_oid } %>
|
|
4
|
+
<%= tag.details id: "scenarios", class: "section pr-scenarios", open: flash.any?, data: {heading: "Scenarios"} do %>
|
|
5
|
+
<summary>
|
|
6
|
+
<span class="heading">Scenarios</span>
|
|
7
|
+
<%# Counted, but not waiting on the owner: a pull request can go without its scenarios. %>
|
|
8
|
+
<%= tag.span "#{seen} of #{scenarios.size} seen on this head", class: "count" %>
|
|
9
|
+
</summary>
|
|
10
|
+
|
|
11
|
+
<ol class="steps-of">
|
|
12
|
+
<% scenarios.each do |scenario| %>
|
|
13
|
+
<%= render "proctolog/scenarios/scenario", scenario:, burst:, steps: scenario.steps_in(stop.description), head: stop.head_oid, seen: marks.scenarios[scenario.name], notes: scenario.noted_in(marks), overlays: marks.overlays_of(scenario.name) %>
|
|
14
|
+
<% end %>
|
|
15
|
+
</ol>
|
|
16
|
+
<% end %>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<%# locals: (since:, stop:) %>
|
|
2
|
+
<section class="since" id="since" aria-labelledby="since-heading">
|
|
3
|
+
<h2 id="since-heading">Changed since your mark</h2>
|
|
4
|
+
|
|
5
|
+
<% if (code = since.code) %>
|
|
6
|
+
<div class="code">
|
|
7
|
+
<h3>The code</h3>
|
|
8
|
+
<p>From <%= short(code.from) %> to <%= short(code.to) %>. <%= link_to "Compare on GitHub", code.compare_url, target: "_blank", rel: "noopener" if code.compare_url %></p>
|
|
9
|
+
<% if code.absent.any? %>
|
|
10
|
+
<p class="absent">This Mac does not have <%= safe_join(code.absent.map { short(it) }, " or ") %>, so it cannot say which files differ. GitHub's comparison can.</p>
|
|
11
|
+
<% elsif code.files.empty? %>
|
|
12
|
+
<p class="none">The files of this pull request are the same in both: the head moved with the layers under it.</p>
|
|
13
|
+
<% else %>
|
|
14
|
+
<% gone = code.files.count { code.dropped?(it) } %>
|
|
15
|
+
<p class="sum"><%= pluralize(code.files.size, "file") %> differ between the two heads<%= ", #{gone} of them no longer part of this pull request" if gone.positive? %>.</p>
|
|
16
|
+
<ul class="files-changed">
|
|
17
|
+
<% code.files.each do |file| %>
|
|
18
|
+
<li>
|
|
19
|
+
<span class="path"><code><%= file.path %></code><% if code.dropped?(file) %> <small class="dropped">no longer part of this pull request</small><% end %></span>
|
|
20
|
+
<span class="lines"><%= lines_of(file) %></span>
|
|
21
|
+
</li>
|
|
22
|
+
<% end %>
|
|
23
|
+
</ul>
|
|
24
|
+
<% end %>
|
|
25
|
+
</div>
|
|
26
|
+
<% end %>
|
|
27
|
+
|
|
28
|
+
<% if (description = since.description) %>
|
|
29
|
+
<div class="words">
|
|
30
|
+
<h3>The description</h3>
|
|
31
|
+
<% if description.is_a?(Proctolog::Since::Forgotten) %>
|
|
32
|
+
<p class="absent">GitHub's history no longer holds the revision of <%= clock(description.at) %>, the one you marked, so it cannot say what changed.</p>
|
|
33
|
+
<% elsif description.unchanged? %>
|
|
34
|
+
<p class="none">No paragraph differs from the revision of <%= clock(description.at) %>: only spacing changed.</p>
|
|
35
|
+
<% else %>
|
|
36
|
+
<p>Against the revision of <%= clock(description.at) %>, the one you marked.</p>
|
|
37
|
+
<%= render "paragraphs", kind: "removed", paragraphs: description.removed %>
|
|
38
|
+
<%= render "paragraphs", kind: "added", paragraphs: description.added %>
|
|
39
|
+
<% end %>
|
|
40
|
+
</div>
|
|
41
|
+
<% end %>
|
|
42
|
+
</section>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<%# locals: (burst:, stop:, standing:) %>
|
|
2
|
+
<%# What should hold before the pull request goes, a bead to each, then whether its scenarios were tried, which is said but never required. Under them the owner's two marks, each saying what it does. The conditions inform the mark; none of them keeps it from being given. %>
|
|
3
|
+
<section class="standing" aria-label="What should hold before it goes">
|
|
4
|
+
<ul class="conditions">
|
|
5
|
+
<% standing.conditions.each do |condition| %>
|
|
6
|
+
<%= tag.li data: {met: condition.met.inspect, about: condition.about} do %>
|
|
7
|
+
<span class="verdict visually-hidden"><%= verdict_of(condition) %>:</span>
|
|
8
|
+
<span class="name"><%= condition.name %></span>
|
|
9
|
+
<span class="detail"><%= with_code(condition.detail) %></span>
|
|
10
|
+
<% end %>
|
|
11
|
+
<% end %>
|
|
12
|
+
<% if (scenarios = standing.scenarios_seen) %>
|
|
13
|
+
<%= tag.li class: "optional", data: {met: scenarios.met.inspect} do %>
|
|
14
|
+
<span class="name"><%= scenarios.name %></span>
|
|
15
|
+
<span class="detail"><%= scenarios.detail %> · not required</span>
|
|
16
|
+
<% end %>
|
|
17
|
+
<% end %>
|
|
18
|
+
</ul>
|
|
19
|
+
|
|
20
|
+
<%# The owner's mark. g presses it from anywhere on the page. %>
|
|
21
|
+
<% marks = standing.marks %>
|
|
22
|
+
<div class="good-to-go">
|
|
23
|
+
<% if !standing.good_to_go? || standing.changed? %>
|
|
24
|
+
<%= button_to burst_pull_request_good_to_go_path(burst, stop.number), params: {head: stop.head_oid, description: stop.description.digest},
|
|
25
|
+
form: {data: {good_to_go: ""}} do %><kbd>g</kbd> Good to go<% end %>
|
|
26
|
+
<span class="hint">Your mark that it can go as it is now: <%= short(stop.head_oid) %> and this description.</span>
|
|
27
|
+
<% end %>
|
|
28
|
+
<% if standing.good_to_go? %>
|
|
29
|
+
<span class="hint">Good to go since <%= clock(marks.good_to_go.at) %>, for <%= short(marks.good_to_go.head) %>.</span>
|
|
30
|
+
<%= button_to "Take it back", burst_pull_request_good_to_go_path(burst, stop.number), method: :delete, class: "quiet" %>
|
|
31
|
+
<% end %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<%# Set aside: while it waits on something outside the burst, the route counts it as waiting rather than as the owner's turn. %>
|
|
35
|
+
<% if marks.waiting_on %>
|
|
36
|
+
<div class="waiting">
|
|
37
|
+
<p>Waiting on <strong><%= marks.waiting_on %></strong>. The route counts it as waiting, not as your turn.</p>
|
|
38
|
+
<%= button_to "No longer waiting", burst_pull_request_waiting_path(burst, stop.number), method: :patch, params: {what: ""}, class: "quiet" %>
|
|
39
|
+
</div>
|
|
40
|
+
<% else %>
|
|
41
|
+
<details class="waiting">
|
|
42
|
+
<summary>Waiting on something outside this burst?</summary>
|
|
43
|
+
<%= form_with url: burst_pull_request_waiting_path(burst, stop.number), method: :patch do |form| %>
|
|
44
|
+
<%= form.label :what, "It waits for" %>
|
|
45
|
+
<%= form.text_field :what, placeholder: "e.g. production's encryption keys", required: true, autocomplete: "off" %>
|
|
46
|
+
<%= form.button "Set it aside", class: "quiet" %>
|
|
47
|
+
<p class="hint">The route then counts it as waiting, not as your turn, until you say it no longer is.</p>
|
|
48
|
+
<% end %>
|
|
49
|
+
</details>
|
|
50
|
+
<% end %>
|
|
51
|
+
</section>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<%# locals: (burst:, stop:, standing:) %>
|
|
2
|
+
<%# Where the pull request stands, in one line under its title: its place in the route, whose turn it is and what is open. What must be met, and the owner's mark, are in the Standing section after the description. %>
|
|
3
|
+
<%= tag.section id: "standing", class: "status", aria: {label: "Where it stands"}, data: {turn: standing.turn} do %>
|
|
4
|
+
<p class="stands"><span class="position"><%= position_of(stop) %>.</span><% if stop.pull_request.unopened? %> <span class="unopened">Not opened, on <code><%= stop.pull_request.head %></code>.</span><% end %> <%= turn_tag(standing) %>. <span class="reasons"><%= reasons_of(standing).upcase_first %>.</span></p>
|
|
5
|
+
<% end %>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<%# locals: (burst:, stop:, scenarios:) %>
|
|
2
|
+
<%# Under the outline. First what a scenario needs before it tries this pull request, a bead to each as Standing has them: a checkout that can run the app, with this pull request's latest commit in it, and the server up on it. When the checkout falls short, one button opens the fix in a popup, as words to copy. Then a button for each scenario, named for it, that makes its state and opens a browser where its steps begin. try.js reads the panel again from the page whenever the server's state moves. %>
|
|
3
|
+
<% server = burst.server %>
|
|
4
|
+
<% state = server.state %>
|
|
5
|
+
<% runnable = server.app.described? && server.runnable? %>
|
|
6
|
+
<% ready = runnable && state == :up %>
|
|
7
|
+
<% holds = server.holds?(stop.head_oid) %>
|
|
8
|
+
<% app = burst.repository.split("/").last.humanize %>
|
|
9
|
+
<% fresh = burst.fresh_sitting(stop) unless runnable && holds %>
|
|
10
|
+
<%= tag.aside id: "try", class: "try", aria: {labelledby: "try-heading"}, data: {try: "", desk: "", state:, status_url: burst_sitting_server_path(burst)} do %>
|
|
11
|
+
<h2 id="try-heading">Try it</h2>
|
|
12
|
+
|
|
13
|
+
<ul class="conditions needs">
|
|
14
|
+
<% if !server.app.described? %>
|
|
15
|
+
<li data-met="false">
|
|
16
|
+
<span class="name">Nothing says how to run <%= app %></span>
|
|
17
|
+
<span class="detail">This checkout has no <code>.proctolog/app.yml</code>. The desk's <code>docs/manual/app.md</code> says how to write one.</span>
|
|
18
|
+
</li>
|
|
19
|
+
<% else %>
|
|
20
|
+
<li data-met="<%= runnable %>">
|
|
21
|
+
<span class="name"><%= runnable ? "The checkout can run #{app}" : "The checkout can't run #{app}" %></span>
|
|
22
|
+
<span class="detail"><%= folder(server.checkout) %><% unless runnable %> has no <code>.proctolog/app.yml</code><% end %>.</span>
|
|
23
|
+
</li>
|
|
24
|
+
<% end %>
|
|
25
|
+
|
|
26
|
+
<li data-met="<%= holds %>">
|
|
27
|
+
<span class="name"><%= holds ? "It has ##{stop.number}'s latest commit" : "It doesn't have ##{stop.number}'s latest commit" %></span>
|
|
28
|
+
<span class="detail">
|
|
29
|
+
<% if holds %>
|
|
30
|
+
On <code><%= server.serving %></code><%= ", with changes of its own" if server.changed? %>.
|
|
31
|
+
<% else %>
|
|
32
|
+
<%= short(stop.head_oid) %>, from <%= day_of(stop.committed_at) %>. The checkout is from <%= day_of(server.head_at) %>.
|
|
33
|
+
<% end %>
|
|
34
|
+
</span>
|
|
35
|
+
</li>
|
|
36
|
+
|
|
37
|
+
<% if fresh %>
|
|
38
|
+
<li class="remedy">
|
|
39
|
+
<button type="button" class="quiet" popovertarget="try-fix">How to fix it</button>
|
|
40
|
+
</li>
|
|
41
|
+
<% end %>
|
|
42
|
+
|
|
43
|
+
<%= tag.li class: "server-state", data: {met: state == :up, state:} do %>
|
|
44
|
+
<% case state %>
|
|
45
|
+
<% when :up %>
|
|
46
|
+
<span class="name">The server is up</span>
|
|
47
|
+
<div class="detail server-action">
|
|
48
|
+
<span>On <%= link_to ":#{server.port}", server.address, target: "_blank", rel: "noopener" %>.</span>
|
|
49
|
+
<% if server.started_here? %>
|
|
50
|
+
<%= button_to "stop", burst_sitting_server_path(burst), method: :delete, class: "quiet", form: {data: {server: ""}} %>
|
|
51
|
+
<% else %>
|
|
52
|
+
Started outside the desk, so it is stopped where it runs.
|
|
53
|
+
<% end %>
|
|
54
|
+
</div>
|
|
55
|
+
<% when :starting %>
|
|
56
|
+
<span class="name">The server is starting</span>
|
|
57
|
+
<div class="detail server-action">
|
|
58
|
+
<span>A minute or two, the first time longer.</span>
|
|
59
|
+
<%= button_to "stop", burst_sitting_server_path(burst), method: :delete, class: "quiet", form: {data: {server: ""}} %>
|
|
60
|
+
</div>
|
|
61
|
+
<% else %>
|
|
62
|
+
<span class="name"><%= server.crashed? ? "The server has stopped" : "The server is down" %></span>
|
|
63
|
+
<div class="detail server-action">
|
|
64
|
+
<% if runnable %>
|
|
65
|
+
<%= button_to (server.crashed? ? "start again" : "start"), burst_sitting_server_path(burst), class: "quiet", form: {data: {server: ""}} %>
|
|
66
|
+
<% else %>
|
|
67
|
+
It waits for the checkout.
|
|
68
|
+
<% end %>
|
|
69
|
+
</div>
|
|
70
|
+
<% if server.crashed? %>
|
|
71
|
+
<span class="detail"><span class="log" tabindex="0" aria-describedby="try-log">The end of its log</span></span>
|
|
72
|
+
<pre class="tail" id="try-log" role="tooltip"><%= log_tail(server) %></pre>
|
|
73
|
+
<% end %>
|
|
74
|
+
<% end %>
|
|
75
|
+
<% end %>
|
|
76
|
+
</ul>
|
|
77
|
+
|
|
78
|
+
<%# A button to each scenario with its name on it, so two never read as one; what they share, the browser, is said once above them. %>
|
|
79
|
+
<% shared = scenarios.map { it.browser.name }.uniq.one? %>
|
|
80
|
+
<section class="tries" aria-label="Scenarios">
|
|
81
|
+
<h3>Scenarios</h3>
|
|
82
|
+
<p class="lede"><%= tries_lede(scenarios.first, ready:, shared:) %></p>
|
|
83
|
+
<ol>
|
|
84
|
+
<% scenarios.each do |scenario| %>
|
|
85
|
+
<li>
|
|
86
|
+
<%= button_to scenario.name, open_burst_scenario_path(burst, scenario), class: "try-one", disabled: !ready,
|
|
87
|
+
form: {target: ("_blank" if scenario.browser.mine?), data: {set_up: ""}} %>
|
|
88
|
+
<span class="how"><%= how_it_starts(scenario, browser: !shared) %></span>
|
|
89
|
+
</li>
|
|
90
|
+
<% end %>
|
|
91
|
+
</ol>
|
|
92
|
+
</section>
|
|
93
|
+
|
|
94
|
+
<% if fresh %>
|
|
95
|
+
<%# The fix as the owner carries it out: what is wrong in plain words, then each step with its words to copy. %>
|
|
96
|
+
<div id="try-fix" popover class="try-pop" aria-labelledby="try-fix-heading">
|
|
97
|
+
<h3 id="try-fix-heading">A checkout that can run #<%= stop.number %></h3>
|
|
98
|
+
<p>
|
|
99
|
+
The scenarios run in <code><%= shown_path(server.checkout) %></code>. It is on <code><%= server.serving %></code>, made <%= day_of(server.head_at) %><%= server.head_subject&.then { safe_join([": “", it, "”"]) } %>.
|
|
100
|
+
<% unless holds %>It doesn't have #<%= stop.number %>'s latest commit, <%= short(stop.head_oid) %>.<% end %>
|
|
101
|
+
<% unless runnable %>Nor does it have <code>.proctolog/app.yml</code>, which came to <%= app %> with <%= arrival_of(server.app) %>. Without it the desk could run <%= app %> on its own development database, so it starts nothing there.<% end %>
|
|
102
|
+
</p>
|
|
103
|
+
<p>Make a checkout of #<%= stop.number %> that has both, and let the scenarios run in it.</p>
|
|
104
|
+
<ol class="steps">
|
|
105
|
+
<li>
|
|
106
|
+
<p>Make it<% unless fresh.picked? %>: #<%= stop.number %>'s head with <%= tag.code(fresh.arrival) %> picked onto it, left uncommitted<% end %>.</p>
|
|
107
|
+
<%= copyable fresh.make %>
|
|
108
|
+
<% if (files = fresh.conflicts).any? %>
|
|
109
|
+
<p>Git will stop on a conflict in <%= safe_join(files.map { tag.code(it) }, ", ") %>. Settle it in place; there is nothing to commit.</p>
|
|
110
|
+
<% end %>
|
|
111
|
+
</li>
|
|
112
|
+
<li>
|
|
113
|
+
<p>Make the scenarios run in it: in this burst file, put these lines in place of its <code>sitting:</code>.</p>
|
|
114
|
+
<%= copyable shown_path(burst.file) %>
|
|
115
|
+
<%= copyable fresh.setting %>
|
|
116
|
+
</li>
|
|
117
|
+
<li><p>Reload this page and press start.</p></li>
|
|
118
|
+
</ol>
|
|
119
|
+
<button type="button" class="quiet" popovertarget="try-fix" popovertargetaction="hide">Close</button>
|
|
120
|
+
</div>
|
|
121
|
+
<% end %>
|
|
122
|
+
<% end %>
|