samagotchi 0.167.0 → 0.168.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 +4 -4
- data/CHANGELOG.md +27 -1
- data/docs/cli.md +14 -10
- data/docs/guardrails.md +2 -3
- data/docs/internals/web-frontend.md +56 -16
- data/docs/testing.md +2 -3
- data/lib/samagotchi/bundle_command.rb +19 -4
- data/lib/samagotchi/bundles/system/manifest.yml +1 -1
- data/lib/samagotchi/compat.rb +1 -5
- data/lib/samagotchi/guardrails/approvals.rb +5 -29
- data/lib/samagotchi/version.rb +1 -1
- data/lib/samagotchi/web/public/dock_reserve.js +12 -2
- data/lib/samagotchi/web/public/history_end.js +16 -0
- data/lib/samagotchi/web/public/index.html +39 -13
- data/lib/samagotchi/web/public/question_cards.js +1 -1
- data/lib/samagotchi/web/public/refs.js +4 -1
- data/lib/samagotchi/web/public/reload_check.js +5 -4
- data/lib/samagotchi/web/public/stage_cards.js +20 -0
- data/lib/samagotchi/web/public/stage_frame.js +14 -16
- data/lib/samagotchi/web/public/stage_model.js +11 -4
- data/lib/samagotchi/web/public/stage_opened.js +229 -0
- data/lib/samagotchi/web/public/stage_slots.js +2 -3
- data/lib/samagotchi/web/public/stage_view.js +219 -147
- data/lib/samagotchi/web/public/stage_watch.js +8 -4
- data/lib/samagotchi/web/public/turn_block.js +14 -2
- metadata +4 -1
|
@@ -204,7 +204,8 @@ export function outlineBlock(blockEl, gens) {
|
|
|
204
204
|
// taskStop the page's stopper (task_stop.js): a running task_wait
|
|
205
205
|
// row gets its stop-task button (none: no button).
|
|
206
206
|
// A new step goes on top of the block while the turn runs (chronological()
|
|
207
|
-
// restores the order at its end)
|
|
207
|
+
// restores the order at its end), or last once inOrder() was called (the
|
|
208
|
+
// block went into the history mid-turn).
|
|
208
209
|
export function createTurnBlock({
|
|
209
210
|
historyEl, isNearBottom, sawText, sessionId, blockHost, follow, placeAnswer,
|
|
210
211
|
onChange = () => {},
|
|
@@ -227,6 +228,9 @@ export function createTurnBlock({
|
|
|
227
228
|
let flushTimer = null;
|
|
228
229
|
// When the last flush wrote something (performance.now()).
|
|
229
230
|
let lastFlushAt = -Infinity;
|
|
231
|
+
// New steps go last, not on top (inOrder: the block left the stage's
|
|
232
|
+
// cloud for the history, stage_opened.js).
|
|
233
|
+
let inOrder = false;
|
|
230
234
|
|
|
231
235
|
function removeHint() {
|
|
232
236
|
const hint = historyEl.querySelector(".hint");
|
|
@@ -318,7 +322,8 @@ export function createTurnBlock({
|
|
|
318
322
|
draw(entry);
|
|
319
323
|
entry.el = entry.end.previousElementSibling || entry.frag.querySelector("details.gen");
|
|
320
324
|
const stick = isNearBottom();
|
|
321
|
-
blockEl.
|
|
325
|
+
if (inOrder) blockEl.appendChild(entry.frag);
|
|
326
|
+
else blockEl.insertBefore(entry.frag, blockSummaryEl.nextSibling);
|
|
322
327
|
if (stick) follow();
|
|
323
328
|
return entry;
|
|
324
329
|
}
|
|
@@ -699,6 +704,7 @@ export function createTurnBlock({
|
|
|
699
704
|
pendingSteers = [];
|
|
700
705
|
cancelFlush();
|
|
701
706
|
lastFlushAt = -Infinity;
|
|
707
|
+
inOrder = false;
|
|
702
708
|
}
|
|
703
709
|
|
|
704
710
|
return {
|
|
@@ -798,6 +804,12 @@ export function createTurnBlock({
|
|
|
798
804
|
return entry ? { el: entry.el, summary: entry.el.querySelector(":scope > summary"), thinkingWrap: thinkingWrap(entry) } : null;
|
|
799
805
|
},
|
|
800
806
|
chronological,
|
|
807
|
+
// From now on the steps are in order: the ones so far, and each new
|
|
808
|
+
// one last.
|
|
809
|
+
inOrder() {
|
|
810
|
+
chronological();
|
|
811
|
+
inOrder = true;
|
|
812
|
+
},
|
|
801
813
|
};
|
|
802
814
|
}
|
|
803
815
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: samagotchi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.168.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dmitry Dedov
|
|
@@ -956,6 +956,7 @@ files:
|
|
|
956
956
|
- lib/samagotchi/web/public/format.js
|
|
957
957
|
- lib/samagotchi/web/public/forms.css
|
|
958
958
|
- lib/samagotchi/web/public/hash_intent.js
|
|
959
|
+
- lib/samagotchi/web/public/history_end.js
|
|
959
960
|
- lib/samagotchi/web/public/history_reveal.js
|
|
960
961
|
- lib/samagotchi/web/public/history_shape.js
|
|
961
962
|
- lib/samagotchi/web/public/icons/chi-180.png
|
|
@@ -1043,8 +1044,10 @@ files:
|
|
|
1043
1044
|
- lib/samagotchi/web/public/settings_panel.js
|
|
1044
1045
|
- lib/samagotchi/web/public/shell_command.js
|
|
1045
1046
|
- lib/samagotchi/web/public/shown_texts.js
|
|
1047
|
+
- lib/samagotchi/web/public/stage_cards.js
|
|
1046
1048
|
- lib/samagotchi/web/public/stage_frame.js
|
|
1047
1049
|
- lib/samagotchi/web/public/stage_model.js
|
|
1050
|
+
- lib/samagotchi/web/public/stage_opened.js
|
|
1048
1051
|
- lib/samagotchi/web/public/stage_slots.js
|
|
1049
1052
|
- lib/samagotchi/web/public/stage_stall.js
|
|
1050
1053
|
- lib/samagotchi/web/public/stage_view.js
|