Repository navigation
Expand file tree
/
Copy pathboost_tuning_guide.html
More file actions
2089 lines (1932 loc) · 106 KB
/
Copy pathboost_tuning_guide.html
File metadata and controls
2089 lines (1932 loc) · 106 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Boost Plugin Tuning Guide</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Segoe UI', system-ui, sans-serif;
background: #0f1117;
color: #e2e8f0;
padding: 32px 24px;
min-width: 900px;
}
/* ── Header ─────────────────────────────────────────────── */
.header {
text-align: center;
margin-bottom: 40px;
}
.header h1 {
font-size: 2rem;
font-weight: 700;
letter-spacing: -0.5px;
color: #fff;
}
.header h1 span { color: #6ee7b7; }
.header p {
margin-top: 8px;
font-size: 0.95rem;
color: #94a3b8;
}
.version-badge {
display: inline-block;
margin-top: 12px;
padding: 4px 12px;
border-radius: 99px;
font-size: 0.78rem;
font-weight: 600;
background: #1e293b;
border: 1px solid #334155;
color: #94a3b8;
}
.version-badge .v1 { color: #60a5fa; }
.version-badge .v2 { color: #a78bfa; }
.version-badge .v6 { color: #fbbf24; }
/* ── Spectrum legend ─────────────────────────────────────── */
.legend {
display: flex;
justify-content: center;
gap: 24px;
margin-bottom: 32px;
}
.legend-item {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.82rem;
color: #94a3b8;
}
.legend-dot {
width: 12px; height: 12px;
border-radius: 3px;
}
.dot-conservative { background: #3b82f6; }
.dot-neutral { background: #6b7280; }
.dot-aggressive { background: #f97316; }
.dot-default { background: #22c55e; }
/* ── Tabs ────────────────────────────────────────────────── */
.tab-bar {
display: flex;
justify-content: center;
gap: 12px;
max-width: 1200px;
margin: 0 auto 32px;
}
.tab-btn {
font: inherit;
font-size: 0.95rem;
font-weight: 700;
letter-spacing: 0.2px;
padding: 10px 32px;
border-radius: 10px;
background: #1e293b;
border: 1px solid #334155;
color: #94a3b8;
cursor: pointer;
}
.tab-btn:hover { color: #e2e8f0; }
.tab-btn.active { color: #0f1117; }
#tab-btn-v1.active { background: #60a5fa; border-color: #60a5fa; }
#tab-btn-v6.active { background: #fbbf24; border-color: #fbbf24; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
a.tab-link { color: #6ee7b7; }
/* ── Section grid ────────────────────────────────────────── */
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
max-width: 1200px;
margin: 0 auto 20px;
}
.grid-3 {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 20px;
max-width: 1200px;
margin: 0 auto 20px;
}
.full-width {
max-width: 1200px;
margin: 0 auto 20px;
}
/* ── Card ────────────────────────────────────────────────── */
.card {
background: #1e293b;
border: 1px solid #2d3748;
border-radius: 12px;
padding: 20px;
}
.card-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid #2d3748;
}
.card-icon {
width: 32px; height: 32px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
flex-shrink: 0;
}
.icon-blue { background: #1d4ed8; }
.icon-orange { background: #c2410c; }
.icon-green { background: #15803d; }
.icon-purple { background: #7c3aed; }
.icon-teal { background: #0f766e; }
.icon-yellow { background: #a16207; }
.icon-red { background: #b91c1c; }
.icon-slate { background: #475569; }
.card-title {
font-size: 0.95rem;
font-weight: 700;
color: #f1f5f9;
letter-spacing: 0.2px;
}
.card-subtitle {
font-size: 0.75rem;
color: #64748b;
margin-top: 2px;
}
/* ── Setting row ─────────────────────────────────────────── */
.setting {
margin-bottom: 14px;
}
.setting:last-child { margin-bottom: 0; }
.setting-top {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 4px;
}
.setting-name {
font-size: 0.82rem;
font-weight: 600;
color: #cbd5e1;
}
.setting-key {
font-size: 0.7rem;
font-family: 'SF Mono', 'Cascadia Code', monospace;
color: #475569;
}
.setting-desc {
font-size: 0.75rem;
color: #64748b;
margin-bottom: 6px;
line-height: 1.4;
}
/* ── Spectrum bar ────────────────────────────────────────── */
.spectrum-wrap {
position: relative;
height: 22px;
}
.spectrum-bar {
height: 8px;
border-radius: 99px;
background: linear-gradient(to right, #3b82f6 0%, #6b7280 50%, #f97316 100%);
margin-top: 7px;
}
.spectrum-labels {
display: flex;
justify-content: space-between;
font-size: 0.65rem;
color: #475569;
margin-top: 2px;
}
.default-marker {
position: absolute;
top: 0;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
}
.default-pip {
width: 10px; height: 10px;
background: #22c55e;
border-radius: 50%;
border: 2px solid #0f1117;
margin-top: 2px;
}
.default-label {
font-size: 0.62rem;
font-weight: 700;
color: #22c55e;
white-space: nowrap;
margin-top: 0px;
}
/* ── Toggle row ──────────────────────────────────────────── */
.toggle-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 10px;
border-radius: 8px;
margin-bottom: 6px;
font-size: 0.8rem;
}
.toggle-row:last-child { margin-bottom: 0; }
.toggle-name { font-weight: 600; color: #cbd5e1; }
.toggle-desc { font-size: 0.72rem; color: #64748b; margin-top: 1px; }
.badge {
font-size: 0.68rem;
font-weight: 700;
padding: 3px 9px;
border-radius: 99px;
white-space: nowrap;
flex-shrink: 0;
margin-left: 10px;
}
.badge-on-agg { background: #431407; color: #fb923c; border: 1px solid #9a3412; }
.badge-off-agg { background: #1e3a5f; color: #60a5fa; border: 1px solid #1d4ed8; }
.badge-on-cons { background: #1e3a5f; color: #60a5fa; border: 1px solid #1d4ed8; }
.badge-off-cons{ background: #431407; color: #fb923c; border: 1px solid #9a3412; }
.badge-neutral { background: #1e293b; color: #94a3b8; border: 1px solid #334155; }
/* ── Formula box ─────────────────────────────────────────── */
.formula-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
margin-top: 4px;
}
.formula-box {
background: #0f1117;
border: 1px solid #2d3748;
border-radius: 8px;
padding: 12px;
}
.formula-label {
font-size: 0.72rem;
font-weight: 700;
margin-bottom: 6px;
}
.formula-label.v1 { color: #60a5fa; }
.formula-label.v2 { color: #a78bfa; }
.formula-label.v6 { color: #fbbf24; }
.formula-text {
font-family: 'SF Mono', 'Cascadia Code', monospace;
font-size: 0.75rem;
color: #e2e8f0;
line-height: 1.5;
}
.formula-note {
font-size: 0.7rem;
color: #64748b;
margin-top: 6px;
line-height: 1.4;
}
/* ── Step table ──────────────────────────────────────────── */
.step-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 8px;
margin-top: 4px;
}
.step-grid-4 {
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.step-cell {
background: #0f1117;
border: 1px solid #2d3748;
border-radius: 8px;
padding: 10px;
text-align: center;
}
.step-cell-label {
font-size: 0.7rem;
color: #64748b;
margin-bottom: 4px;
}
.step-cell-value {
font-size: 1rem;
font-weight: 700;
color: #f1f5f9;
}
.step-cell-unit {
font-size: 0.65rem;
color: #475569;
margin-top: 2px;
}
/* ── Summary / guidance ──────────────────────────────────── */
.guidance-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.guidance-box {
border-radius: 8px;
padding: 14px;
}
.guidance-box.conservative { background: #0c1a2e; border: 1px solid #1d4ed8; }
.guidance-box.aggressive { background: #1c0a00; border: 1px solid #c2410c; }
.guidance-box h4 {
font-size: 0.82rem;
font-weight: 700;
margin-bottom: 8px;
}
.guidance-box.conservative h4 { color: #60a5fa; }
.guidance-box.aggressive h4 { color: #fb923c; }
.guidance-box ul {
list-style: none;
padding: 0;
}
.guidance-box li {
font-size: 0.76rem;
color: #94a3b8;
padding: 3px 0;
padding-left: 14px;
position: relative;
line-height: 1.35;
}
.guidance-box.conservative li::before { content: '↓'; position: absolute; left: 0; color: #3b82f6; }
.guidance-box.aggressive li::before { content: '↑'; position: absolute; left: 0; color: #f97316; }
/* ── Warning banner ──────────────────────────────────────── */
.warning {
background: #1c1400;
border: 1px solid #854d0e;
border-radius: 8px;
padding: 12px 16px;
font-size: 0.78rem;
color: #fde047;
display: flex;
gap: 10px;
align-items: flex-start;
margin-top: 0;
}
.warning-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.warning b { color: #fef08a; }
/* ── V2 diff callout ─────────────────────────────────────── */
.v2-diff {
background: #130d27;
border: 1px solid #7c3aed;
border-radius: 8px;
padding: 10px 14px;
font-size: 0.77rem;
color: #c4b5fd;
margin-top: 12px;
}
.v2-diff b { color: #a78bfa; }
.v6-diff {
background: #1c1503;
border: 1px solid #a16207;
border-radius: 8px;
padding: 10px 14px;
font-size: 0.77rem;
color: #fde68a;
margin-top: 12px;
}
.v6-diff b { color: #fbbf24; }
/* V6 state-machine flow */
.v6-flow {
display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px;
margin: 14px 0 4px;
}
.v6-state {
flex: 1; min-width: 120px;
border-radius: 8px; padding: 10px 12px;
background: #0f1117; border: 1px solid #334155;
}
.v6-state .nm { font-weight: 700; font-size: 0.82rem; }
.v6-state .ml { font-family: ui-monospace, monospace; font-size: 0.95rem; font-weight: 700; }
.v6-state .ds { font-size: 0.7rem; color: #64748b; margin-top: 3px; line-height: 1.35; }
/* ── Footer ──────────────────────────────────────────────── */
.footer {
text-align: center;
margin-top: 32px;
font-size: 0.72rem;
color: #334155;
}
/* ── Scenario cards ───────────────────────────────────────── */
.scenario-section-header {
text-align: center;
margin: 48px 0 28px;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
}
.scenario-section-header h2 {
font-size: 1.4rem;
font-weight: 700;
color: #fff;
}
.scenario-section-header h2 span { color: #6ee7b7; }
.scenario-section-header p {
font-size: 0.85rem;
color: #64748b;
margin-top: 6px;
}
.scenario-card {
max-width: 1200px;
margin: 0 auto 20px;
border-radius: 14px;
overflow: hidden;
border: 1px solid;
}
.scenario-card.hypo { border-color: #7f1d1d; }
.scenario-card.plateau { border-color: #78350f; }
.scenario-card.stuck { border-color: #1e3a5f; }
.scenario-banner {
padding: 18px 24px;
display: flex;
align-items: flex-start;
gap: 16px;
}
.scenario-card.hypo .scenario-banner { background: #1c0505; }
.scenario-card.plateau .scenario-banner { background: #1c0f00; }
.scenario-card.stuck .scenario-banner { background: #040d1c; }
.scenario-icon {
font-size: 1.8rem;
flex-shrink: 0;
line-height: 1;
margin-top: 2px;
}
.scenario-title {
font-size: 1.05rem;
font-weight: 700;
color: #fff;
margin-bottom: 4px;
}
.scenario-card.hypo .scenario-title { color: #fca5a5; }
.scenario-card.plateau .scenario-title { color: #fcd34d; }
.scenario-card.stuck .scenario-title { color: #93c5fd; }
.scenario-subtitle {
font-size: 0.8rem;
color: #64748b;
line-height: 1.4;
}
.scenario-body {
background: #1e293b;
padding: 20px 24px;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 16px;
}
.scenario-col-title {
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.5px;
text-transform: uppercase;
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 1px solid #2d3748;
}
.col-mechanism .scenario-col-title { color: #94a3b8; }
.col-fix .scenario-col-title { color: #6ee7b7; }
.col-avoid .scenario-col-title { color: #f97316; }
.mechanism-text {
font-size: 0.78rem;
color: #94a3b8;
line-height: 1.6;
}
.mechanism-text b { color: #cbd5e1; }
.fix-list {
list-style: none;
padding: 0;
}
.fix-list li {
font-size: 0.78rem;
color: #94a3b8;
padding: 5px 0 5px 14px;
position: relative;
border-bottom: 1px solid #1e293b;
line-height: 1.4;
}
.fix-list li:last-child { border-bottom: none; }
.fix-list li::before {
content: '→';
position: absolute;
left: 0;
color: #6ee7b7;
font-weight: 700;
}
.fix-list li b { color: #f1f5f9; }
.fix-list li .fix-val {
display: inline-block;
margin-top: 3px;
font-family: monospace;
font-size: 0.72rem;
background: #0f1117;
border: 1px solid #334155;
border-radius: 4px;
padding: 1px 6px;
color: #6ee7b7;
}
.fix-priority {
display: inline-block;
font-size: 0.62rem;
font-weight: 700;
padding: 1px 5px;
border-radius: 3px;
margin-left: 4px;
vertical-align: middle;
background: #064e3b;
color: #34d399;
border: 1px solid #059669;
}
.avoid-list {
list-style: none;
padding: 0;
}
.avoid-list li {
font-size: 0.78rem;
color: #94a3b8;
padding: 5px 0 5px 14px;
position: relative;
border-bottom: 1px solid #1e293b;
line-height: 1.4;
}
.avoid-list li:last-child { border-bottom: none; }
.avoid-list li::before {
content: '✕';
position: absolute;
left: 0;
color: #f87171;
font-weight: 700;
font-size: 0.7rem;
}
.avoid-list li b { color: #fca5a5; }
/* Helper */
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
</style>
</head>
<body>
<!-- ══════════════════════════════════════════════════════════ -->
<!-- HEADER (shared) -->
<!-- ══════════════════════════════════════════════════════════ -->
<div class="header">
<div style="font-size:0.8rem;margin-bottom:8px"><a href="boost_simulator.html" style="color:#6ee7b7">Simulator</a> · <b style="color:#94a3b8">Tuning Guide</b> · <a href="boost_analyser.html" style="color:#6ee7b7">Analyser</a></div>
<h1>Boost Plugin <span>Tuning Guide</span></h1>
<p>How each setting controls aggressiveness — and how to adjust them. <b style="color:#6ee7b7">Measure before you tune:</b> the <a href="boost_analyser.html" style="color:#6ee7b7">Analyser</a> reads your own Nightscout and shows which levers the data actually points at.</p>
<p style="font-size:0.75rem;color:#f59e0b;margin-top:6px">⚠️ Experimental research fork — not medical advice, not a released or approved product. Decisions about your diabetes are yours and your clinician's.</p>
<div class="version-badge">
<span class="v1">BOOST v1</span>
·
<span class="v2">BOOST V2</span>
·
<span class="v6">BOOST V6</span>
· V1/V2 settings share one tab and V6's 3-knob engine has its own. Pick a tab below.
</div>
<p style="font-size:0.8rem;margin-top:10px">Versions: this guide covers Boost 6.3.2 for AAPS 4.0.0 (the <a href="https://github.com/tim2000s/Boost" style="color:#6ee7b7">master</a> branch of tim2000s/Boost) and Boost 6.2.0 for AAPS 3.4.2.6 (the <a href="https://github.com/tim2000s/Boost/tree/dev-3.4.2.6" style="color:#6ee7b7">dev-3.4.2.6</a> branch). Where they differ, a note beginning "In 6.2.0 (AAPS 3.4.2.6):" gives the older behaviour. In 6.3.2 there is one Boost plugin, named Boost in Config Builder, and it always runs V6; the settings on the V1 tab belong to the base engine that V6 still uses, and they sit under Boost, Advanced settings. Installing 6.3.2 over plain Boost moves you to V6 dosing, and your sensitivity settings are converted once on the first loop cycle (<a href="https://github.com/tim2000s/Boost/blob/master/README.md#dosing-changes-from-boost-620" style="color:#6ee7b7">6.3.2 README</a>). In 6.2.0 (AAPS 3.4.2.6): V6 ran only with the Boost V6 plugin selected as the APS, and the plain Boost plugin ran the base engine with V6 in shadow.</p>
</div>
<div class="legend">
<div class="legend-item"><div class="legend-dot dot-conservative"></div>More conservative</div>
<div class="legend-item"><div class="legend-dot dot-default"></div>Default value</div>
<div class="legend-item"><div class="legend-dot dot-aggressive"></div>More aggressive</div>
</div>
<!-- ══════════════════════════════════════════════════════════ -->
<!-- TAB BAR -->
<!-- ══════════════════════════════════════════════════════════ -->
<div class="tab-bar" role="tablist">
<button type="button" class="tab-btn" id="tab-btn-v1" role="tab" aria-controls="panel-v1">Boost V1</button>
<button type="button" class="tab-btn" id="tab-btn-v6" role="tab" aria-controls="panel-v6">Boost V6</button>
</div>
<!-- ╔══════════════════════════════════════════════════════════╗ -->
<!-- ║ TAB: BOOST V1 (V1/V2 tier engine + shared settings) ║ -->
<!-- ╚══════════════════════════════════════════════════════════╝ -->
<div class="tab-panel" id="panel-v1" role="tabpanel">
<!-- ══════════════════════════════════════════════════════════ -->
<!-- ROW 1: Core delivery limits + Dynamic ISF -->
<!-- ══════════════════════════════════════════════════════════ -->
<div class="grid full-width">
<!-- Core Delivery Controls -->
<div class="card">
<div class="card-header">
<div class="card-icon icon-orange">💉</div>
<div>
<div class="card-title">Core Delivery Controls</div>
<div class="card-subtitle">Primary levers for how much insulin Boost delivers</div>
</div>
</div>
<p style="font-size:0.77rem; color:#64748b; margin-bottom:12px;">
In 6.3.2, Boost Max IOB is on the main Boost screen, and Boost Insulin Required % and Boost Scale Value are under
Advanced settings, Boost base-engine SMB sizing. Boost Bolus Cap and the two percent-scale settings are not shown
and keep their stored or default values. In 6.2.0 (AAPS 3.4.2.6): all of these were on the plain Boost plugin's screen.
</p>
<!-- Boost Scale -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">Boost Scale</span>
<span class="setting-key">ApsBoostScale</span>
</div>
<div class="setting-desc">Direct multiplier on the calculated UAM Boost insulin. At the 3.0 maximum only the
<b>UAM Boost tiers (3 & 4)</b> stand down (they require scale < 3) — the COB tiers (1/2), percent-scale
tier 5 and acceleration tier 6 still run. Setting 3.0 does <b>not</b> disable Boost or fall back to plain oref1.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 31%">
<div class="default-pip"></div>
<div class="default-label">1.0</div>
</div>
<div class="spectrum-labels"><span>0.1 (min)</span><span>3.0 (max — gates off UAM tiers 3/4)</span></div>
</div>
</div>
<!-- Max IOB -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">Max IOB</span>
<span class="setting-key">ApsBoostMaxIob</span>
</div>
<div class="setting-desc">Boost's own IOB gate — <b>distinct from AAPS's global Max IOB</b> (OpenAPS SMB settings), and both apply.
On V1, above this the boost tiers stand down and standard oref1 corrections continue. On V6 it is a hard headroom
clamp: a dose can never push IOB past <b>min(Boost Max IOB, AAPS Max IOB)</b>, with a graduated brake from 50% of it.
If you raise one, check the other — the lower of the two wins.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 8%">
<div class="default-pip"></div>
<div class="default-label">1.0 U</div>
</div>
<div class="spectrum-labels"><span>0.1 U</span><span>12.0 U</span></div>
</div>
</div>
<!-- Bolus Cap -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">Bolus Cap</span>
<span class="setting-key">ApsBoostBolus</span>
</div>
<div class="setting-desc">Maximum insulin per individual Boost SMB delivery regardless of other calculations.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 24%">
<div class="default-pip"></div>
<div class="default-label">2.5 U</div>
</div>
<div class="spectrum-labels"><span>0.1 U</span><span>10.0 U</span></div>
</div>
</div>
<!-- Insulin Required % -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">Insulin Required %</span>
<span class="setting-key">ApsBoostInsulinReqPct</span>
</div>
<div class="setting-desc">What fraction of the algorithm's calculated insulin need to actually deliver as an SMB.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 29%">
<div class="default-pip"></div>
<div class="default-label">50%</div>
</div>
<div class="spectrum-labels"><span>30% (cautious)</span><span>100% (full)</span></div>
</div>
</div>
<!-- Percent Scale -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">Percent Scale Factor</span>
<span class="setting-key">ApsBoostPercentScale</span>
</div>
<div class="setting-desc">Max scale factor when BG is <b>110–180 mg/dL, rising (delta > 3 mg/dL/5min) and
accelerating</b>. Only active if Percent Scaling is enabled. The lower bound was deliberately raised from 98 to
110 after data showed high hypo rates when it fired at BG 90–110.
In 6.3.2 neither percent-scale setting is offered: percent scaling is on at 200%, and a value stored by 3.4 still
applies, so an install that had it off keeps it off. In 6.2.0 (AAPS 3.4.2.6): both are settings, with percent
scaling off by default.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 33%">
<div class="default-pip"></div>
<div class="default-label">200%</div>
</div>
<div class="spectrum-labels"><span>50%</span><span>500%</span></div>
</div>
</div>
<div style="border-top: 1px solid #2d3748; margin: 14px 0;"></div>
<div class="card-title" style="font-size:0.85rem; margin-bottom:10px;">Per-SMB size caps (AAPS SMB settings, also listed under Boost's Safety settings)</div>
<div class="setting">
<div class="setting-top">
<span class="setting-name">UAM max minutes of basal to limit SMB</span>
<span class="setting-key">uamsmbmaxminutes</span>
</div>
<div class="setting-desc">Caps one SMB at <i>current basal × this ÷ 60</i>. Boost uses this UAM value while IOB is
above −0.2 U, and its sibling <span class="setting-key">smbmaxminutes</span> (Max minutes of basal to limit SMB) when
IOB has fallen below that, as after a long low temp basal. Both apply only to the SMB that oref sizes itself:
Tier 8, and every SMB while Boost's gate is closed (night window, high temp target, sleep). V6's meal doses and
Tiers 1 to 7 have their own limits. The cap bounds the size of one SMB and says nothing about how often it repeats.
In 6.3.2 Boost sets the two to 15 (standard) and 20 (UAM) the first time it runs, where nothing is stored yet, and a
notification says so; after that the values are yours to change. Settings imported from AAPS without Boost have both
reset, so they start at 15 and 20 in the same way. (6.3.0 and 6.3.1 lowered a higher value on every loop cycle.)
In 6.2.0 (AAPS 3.4.2.6): both default to 15 (range 15 to 120) with no ceiling enforced, and the
6.2.0 README advises 20 for UAM and 15 for the standard setting.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 0%">
<div class="default-pip"></div>
<div class="default-label">15 to 20 min</div>
</div>
<div class="spectrum-labels"><span>15 (min)</span><span>120 (max)</span></div>
</div>
</div>
</div>
<!-- Dynamic ISF -->
<div class="card">
<div class="card-header">
<div class="card-icon icon-blue">📐</div>
<div>
<div class="card-title">Dynamic ISF</div>
<div class="card-subtitle">How insulin sensitivity is calculated from TDD and BG</div>
</div>
</div>
<!-- DynISF Velocity -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">BG Impact on ISF</span>
<span class="setting-key">ApsBoostDynIsfVelocity</span>
</div>
<div class="setting-desc">How much current BG level shifts ISF. 0% = constant ISF from TDD only. 100% = ISF scales fully with BG level. <b style="color:#a78bfa">V2: always 100%.</b></div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 100%">
<div class="default-pip"></div>
<div class="default-label">100%</div>
</div>
<div class="spectrum-labels"><span>0% (flat)</span><span>100% (BG-reactive)</span></div>
</div>
</div>
<!-- Normal Target -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">DynISF Normal Target</span>
<span class="setting-key">ApsBoostDynIsfNormalTarget</span>
</div>
<div class="setting-desc">Reference BG used in the ISF formula. Lower = more aggressive ISF at a given BG.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar" style="background: linear-gradient(to right, #f97316, #6b7280, #3b82f6)"></div>
<div class="default-marker" style="left: 58%">
<div class="default-pip"></div>
<div class="default-label">99 mg/dL</div>
</div>
<div class="spectrum-labels"><span>70 (aggressive)</span><span>120 (conservative)</span></div>
</div>
</div>
<!-- BG Cap -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">DynISF BG Cap</span>
<span class="setting-key">ApsBoostDynIsfBgCap</span>
</div>
<div class="setting-desc">BG above this is softened: effective BG = cap + (actual − cap) ÷ 3. Prevents extreme ISF at very high BG. A <b>low</b> cap softens more of the range = weaker ISF up high = less insulin (conservative); a high cap leaves the full BG signal in play (aggressive).</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 55%">
<div class="default-pip"></div>
<div class="default-label">210 mg/dL</div>
</div>
<div class="spectrum-labels"><span>100 (most softening — conservative)</span><span>300 (least softening — aggressive)</span></div>
</div>
</div>
<!-- TDD Adjustment Factor -->
<div class="setting">
<div class="setting-top">
<span class="setting-name">TDD Adjustment Factor</span>
<span class="setting-key">ApsBoostDynIsfAdjustmentFactor</span>
</div>
<div class="setting-desc">Scales the TDD used in ISF calculation. Below 100% = treats you as lower TDD = weaker ISF = less insulin.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 33%">
<div class="default-pip"></div>
<div class="default-label">100%</div>
</div>
<div class="spectrum-labels"><span>1% (very weak ISF)</span><span>300% (very strong ISF)</span></div>
</div>
</div>
<!-- Formula callout -->
<div class="formula-grid mt8">
<div class="formula-box">
<div class="formula-label v1">BOOST v1 ISF Formula</div>
<div class="formula-text">ISF = 1800 ÷ (TDD × ln(target ÷ div + 1))</div>
<div class="formula-note">TDD is a blended 8h/7D/1D weighted average. Velocity scales BG sensitivity.</div>
</div>
<div class="formula-box">
<div class="formula-label v2">BOOST v2 ISF Formula (Chris Wilson), 6.2.0 only</div>
<div class="formula-text">ISF = 2300 ÷ (ln(target ÷ div + 1) × TDD² × 0.02)</div>
<div class="formula-note">Squares TDD — more sensitive to TDD changes. Velocity is always 1.0.</div>
</div>
</div>
</div>
</div>
<!-- ══════════════════════════════════════════════════════════ -->
<!-- ROW 2: Activity / Inactivity / Night -->
<!-- ══════════════════════════════════════════════════════════ -->
<div class="grid full-width">
<!-- Activity Detection -->
<div class="card">
<div class="card-header">
<div class="card-icon icon-green">🏃</div>
<div>
<div class="card-title">Activity Detection</div>
<div class="card-subtitle">Step-count thresholds and insulin adjustment when active</div>
</div>
</div>
<p style="font-size:0.77rem; color:#64748b; margin-bottom:12px;">
When <b style="color:#cbd5e1">ANY of the four windows</b> below is exceeded, the <b style="color:#cbd5e1">Activity Profile %</b> is applied and BG target is set to 150 mg/dL (if no temp target is active).
</p>
<div class="step-grid step-grid-4">
<div class="step-cell">
<div class="step-cell-label">5-min window</div>
<div class="step-cell-value">420</div>
<div class="step-cell-unit">steps triggers active</div>
</div>
<div class="step-cell">
<div class="step-cell-label">15-min window</div>
<div class="step-cell-value">800</div>
<div class="step-cell-unit">steps triggers active</div>
</div>
<div class="step-cell">
<div class="step-cell-label">30-min window</div>
<div class="step-cell-value">1,200</div>
<div class="step-cell-unit">steps triggers active</div>
</div>
<div class="step-cell">
<div class="step-cell-label">60-min window</div>
<div class="step-cell-value">1,800</div>
<div class="step-cell-unit">steps triggers active</div>
</div>
</div>
<div class="setting mt12">
<div class="setting-top">
<span class="setting-name">Activity Profile %</span>
<span class="setting-key">ApsBoostActivityPct</span>
</div>
<div class="setting-desc">Applied when active. Works like a profile switch: ISF is <b>divided</b> by (this ÷ 100)
and basal <b>multiplied</b> by it — so <b><100% = higher ISF + lower basal = LESS insulin</b> while you're
moving. The default 80% cuts delivery roughly 20%. Values >100% would give <i>more</i> insulin (rarely wanted
for activity).</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 42%">
<div class="default-pip"></div>
<div class="default-label">80%</div>
</div>
<div class="spectrum-labels"><span>30% (least insulin)</span><span>150% (more insulin)</span></div>
</div>
</div>
<div class="setting">
<div class="setting-top">
<span class="setting-name">Inactivity Profile %</span>
<span class="setting-key">ApsBoostInactivityPct</span>
</div>
<div class="setting-desc">Applied when steps/hr is below the inactivity threshold. Same mechanics:
<b>>100% = lower ISF + higher basal = MORE insulin</b> during sedentary periods, countering sedentary insulin
resistance. The default 130% delivers ~30% more. 100% = no change.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 30%">
<div class="default-pip"></div>
<div class="default-label">130%</div>
</div>
<div class="spectrum-labels"><span>100% (no change)</span><span>200% (much more insulin)</span></div>
</div>
</div>
<div class="setting">
<div class="setting-top">
<span class="setting-name">Inactivity Threshold</span>
<span class="setting-key">ApsBoostInactivitySteps</span>
</div>
<div class="setting-desc">Steps per hour below which inactivity mode triggers. Higher = easier to trigger the sedentary (more-insulin) adjustment.</div>
<div class="spectrum-wrap">
<div class="spectrum-bar"></div>
<div class="default-marker" style="left: 50%">
<div class="default-pip"></div>
<div class="default-label">500/hr</div>
</div>
<div class="spectrum-labels"><span>0 steps/hr</span><span>1,000 steps/hr</span></div>
</div>
</div>
</div>
<!-- Night Mode + Sleep-in -->
<div class="card">
<div class="card-header">
<div class="card-icon icon-purple">🌙</div>
<div>
<div class="card-title">Night Mode & Sleep-in</div>
<div class="card-subtitle">SMB suppression near target — and, since July 2026, the schedule that decides when V6 doses at all</div>
</div>
</div>
<div class="toggle-row" style="background:#0f1117; border:1px solid #2d3748">
<div>
<div class="toggle-name">Night Mode</div>
<div class="toggle-desc">Two jobs: (1) suppresses SMBs in the night window while BG is near target (within BG Offset —
a genuine high still gets corrected); (2) <b>defines when V6 dosing is active</b> — V6's amplified doses run only
OUTSIDE the night/sleep period, falling back to the V1 base dose overnight. With night mode OFF, V6 runs 24/7 with
no scheduled off-switch — recommended ON for V6 users.</div>
</div>
<span class="badge badge-on-cons">Default: OFF</span>
</div>
<div class="toggle-row mt8" style="background:#0f1117; border:1px solid #2d3748">
<div>
<div class="toggle-name">Auto-detect sleep (HR + steps)</div>
<div class="toggle-desc">Lets the HR/step sleep detector extend night mode past the clock (still asleep) or start it
early (pre-sleep), and on V6 flex the dosing window with your actual sleep. Needs a worn HR source.
In 6.3.2: a sleep that begins in the 90 minutes before the night window is held unless steps, or heart rate with
steps, show you are up again; in the 90 minutes before night end, walking ends sleep (steps over the last hour
reaching your Sleep-in Steps setting, with at least 100 in the last 15 minutes); watch steps are counted once; and
a Health Connect step top-up is no longer a reason to wake. In 6.2.0 (AAPS 3.4.2.6): none of these four changes
applies.</div>
</div>
<span class="badge badge-neutral">Default: OFF</span>
</div>