instar 1.3.2021 → 1.3.2022
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.
- package/dashboard/console/chats.js +75 -14
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/native/InstarWedgeCanary.app/Contents/MacOS/InstarWedgeCanary +0 -0
- package/dist/native/instar-desktop-host +0 -0
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/upgrades/1.3.2022.md +20 -0
- package/upgrades/side-effects/dashboard-chat-history-states.md +41 -0
|
@@ -650,6 +650,7 @@ class ChatsPage {
|
|
|
650
650
|
this.view = null;
|
|
651
651
|
if (!v) return;
|
|
652
652
|
v.live = false;
|
|
653
|
+
if (v.historyWaitTimer) { clearTimeout(v.historyWaitTimer); this.timers.delete(v.historyWaitTimer); }
|
|
653
654
|
if (v.abort) { try { v.abort.abort(); } catch { /* done */ } }
|
|
654
655
|
this.revokeBlobs();
|
|
655
656
|
if (this.observer) { try { this.observer.disconnect(); } catch { /* gone */ } this.observer = null; }
|
|
@@ -672,6 +673,11 @@ class ChatsPage {
|
|
|
672
673
|
menu.append(rename, del);
|
|
673
674
|
}
|
|
674
675
|
v.msgs = el('div', { class: 'chat-messages', role: 'log', 'aria-live': 'polite' });
|
|
676
|
+
v.historyWords = el('p', { class: 'card-line chat-muted' });
|
|
677
|
+
v.historyRetry = el('button', { class: 'btn-quiet chat-history-retry', type: 'button', text: 'Try again', hidden: true });
|
|
678
|
+
v.historyRetry.addEventListener('click', () => this.loadFirst(v));
|
|
679
|
+
v.historyNotice = el('div', { class: 'chat-history-state', role: 'status' }, v.historyWords, v.historyRetry);
|
|
680
|
+
v.msgs.append(v.historyNotice);
|
|
675
681
|
v.earlier = el('button', { class: 'btn-quiet chat-earlier', type: 'button', text: 'Earlier messages', hidden: true });
|
|
676
682
|
v.earlier.addEventListener('click', () => { this.pauseSource(v); this.loadEarlier(v); });
|
|
677
683
|
v.paused = el('p', { class: 'card-line chat-muted chat-paused', hidden: true, text: 'Live updates paused here — this conversation refreshes when you click into this window.' });
|
|
@@ -688,7 +694,7 @@ class ChatsPage {
|
|
|
688
694
|
v.appStrip, v.pinBar, v.paused, v.sourceNotice, v.earlier, v.msgs, this.composer(v), v.statusLine));
|
|
689
695
|
this.pageEl.classList.add('has-open');
|
|
690
696
|
this.paintList();
|
|
691
|
-
this.loadFirst(v);
|
|
697
|
+
this.loadFirst(v, { recoverUnfinished: true });
|
|
692
698
|
this.loadAppStrip(v);
|
|
693
699
|
this.announce();
|
|
694
700
|
}
|
|
@@ -744,21 +750,71 @@ class ChatsPage {
|
|
|
744
750
|
return (row) => Boolean(row && ((rec && row.originDeviceId && row.originDeviceId === rec.deviceId) || (row.messageId && this.ownIds.has(String(row.messageId)))));
|
|
745
751
|
}
|
|
746
752
|
|
|
747
|
-
async loadFirst(v) {
|
|
753
|
+
async loadFirst(v, { recoverUnfinished = false } = {}) {
|
|
754
|
+
if (!this.live || !v.live || this.view !== v || v.historyPending) return;
|
|
755
|
+
v.historyPending = true;
|
|
756
|
+
v.historyError = null;
|
|
757
|
+
v.historyWaiting = false;
|
|
758
|
+
this.paintHistoryState(v);
|
|
759
|
+
v.historyWaitTimer = this.later(() => {
|
|
760
|
+
if (!v.live || this.view !== v || !v.historyPending) return;
|
|
761
|
+
v.historyWaiting = true;
|
|
762
|
+
this.paintHistoryState(v);
|
|
763
|
+
}, 10_000);
|
|
748
764
|
this.spent();
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
765
|
+
try {
|
|
766
|
+
const r = await this.readHistory(v, this.historyPath(v, { pool: true }));
|
|
767
|
+
if (!this.live || !v.live || this.view !== v || r.gone) return;
|
|
768
|
+
if (!r.ok) {
|
|
769
|
+
v.sourceNotice.hidden = true;
|
|
770
|
+
v.historyError = r.status === 404 ? 'This conversation is not here any more.' : 'Couldn\'t load this conversation right now.';
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
v.historyReady = true;
|
|
774
|
+
this.applyHistory(v, r.data, { replace: true });
|
|
775
|
+
// Preserve the existing open-time recovery; a history retry never resumes a send.
|
|
776
|
+
if (recoverUnfinished) this.resumeUnfinished(v);
|
|
777
|
+
this.scrollToEnd(v, true);
|
|
778
|
+
this.findSource(v);
|
|
779
|
+
} catch {
|
|
780
|
+
// A failed history read changes only its explanation, never messages or a draft.
|
|
781
|
+
if (this.live && v.live && this.view === v) v.historyError = 'Couldn\'t load this conversation right now.';
|
|
782
|
+
} finally {
|
|
783
|
+
v.historyPending = false;
|
|
784
|
+
clearTimeout(v.historyWaitTimer); this.timers.delete(v.historyWaitTimer);
|
|
785
|
+
v.historyWaitTimer = null;
|
|
786
|
+
if (this.live && v.live && this.view === v) this.paintHistoryState(v);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/** Initial, retry, focus and scheduled reads of one view/path share one signed request. */
|
|
791
|
+
readHistory(v, path) {
|
|
792
|
+
if (!v.historyReads) v.historyReads = new Map();
|
|
793
|
+
const current = v.historyReads.get(path);
|
|
794
|
+
if (current) return current;
|
|
795
|
+
const pending = this.call('GET', path).finally(() => {
|
|
796
|
+
if (v.historyReads.get(path) === pending) v.historyReads.delete(path);
|
|
797
|
+
});
|
|
798
|
+
v.historyReads.set(path, pending);
|
|
799
|
+
return pending;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
paintHistoryState(v) {
|
|
803
|
+
if (!v.historyNotice) return;
|
|
804
|
+
const hasMessages = v.list.length > 0;
|
|
805
|
+
v.historyNotice.hidden = hasMessages && !v.historyError;
|
|
806
|
+
v.historyRetry.hidden = v.historyPending || (!v.historyError && hasMessages);
|
|
807
|
+
v.historyRetry.disabled = Boolean(v.historyPending);
|
|
808
|
+
if (v.historyError) v.historyWords.textContent = hasMessages
|
|
809
|
+
? 'Couldn\'t refresh this conversation. Messages already loaded are still shown.' : v.historyError;
|
|
810
|
+
else if (v.historyPending) v.historyWords.textContent = v.historyWaiting
|
|
811
|
+
? 'Waiting for the agent to return this conversation\'s messages. Your draft is unchanged.' : 'Loading messages…';
|
|
812
|
+
else v.historyWords.textContent = 'No messages were returned for this conversation. Try again to check its history.';
|
|
758
813
|
}
|
|
759
814
|
|
|
760
815
|
applyHistory(v, data, { replace = false, earlier = false } = {}) {
|
|
761
816
|
if (!data) return;
|
|
817
|
+
v.historyError = null;
|
|
762
818
|
if (v.ref.kind === 'slack' && typeof data.conversationKey === 'string') v.slackKey = data.conversationKey;
|
|
763
819
|
const pins = pinsFrom(data);
|
|
764
820
|
if (pins) this.setPins(v, pins);
|
|
@@ -831,6 +887,7 @@ class ChatsPage {
|
|
|
831
887
|
}
|
|
832
888
|
prev = n;
|
|
833
889
|
}
|
|
890
|
+
this.paintHistoryState(v);
|
|
834
891
|
if (atEnd) this.scrollToEnd(v);
|
|
835
892
|
}
|
|
836
893
|
scrollToEnd(v, force) {
|
|
@@ -1451,7 +1508,11 @@ class ChatsPage {
|
|
|
1451
1508
|
// Snapshot the exact baseline sent: another tab's result may arrive while this read waits.
|
|
1452
1509
|
const previous = task.mode === 'newest' ? this.quickPages.get(task.ref) || null : null;
|
|
1453
1510
|
let r;
|
|
1454
|
-
try {
|
|
1511
|
+
try {
|
|
1512
|
+
const path = this.taskPath(task);
|
|
1513
|
+
const v = this.view;
|
|
1514
|
+
r = v?.live && task.ref === refString(v.ref) ? await this.readHistory(v, path) : await this.call('GET', path);
|
|
1515
|
+
} catch { r = { ok: false, status: 0 }; }
|
|
1455
1516
|
if (!this.live) return;
|
|
1456
1517
|
this.scheduler.finish(task, now(), { status: r.status, retryAfterMs: r.retryAfterMs });
|
|
1457
1518
|
if (r.gone) return;
|
|
@@ -1510,11 +1571,11 @@ class ChatsPage {
|
|
|
1510
1571
|
|
|
1511
1572
|
/** The focused tab's conversation: read now (an operator-caused read, counted in the budget). */
|
|
1512
1573
|
async pollNow(v) {
|
|
1513
|
-
if (!v || !v.live) return;
|
|
1574
|
+
if (!v || !v.live || v.historyPending) return;
|
|
1514
1575
|
const ref = refString(v.ref);
|
|
1515
1576
|
if (this.leader && this.scheduler.tasks().some((t) => t.ref === ref && t.mode !== 'pool')) { this.scheduler.bump(ref, now()); this.loop(); return; }
|
|
1516
1577
|
this.spent();
|
|
1517
|
-
const r = await this.
|
|
1578
|
+
const r = await this.readHistory(v, this.historyPath(v, { pool: v.ref.kind !== 'slack' }));
|
|
1518
1579
|
if (r.ok && v.live) this.applyHistory(v, r.data);
|
|
1519
1580
|
}
|
|
1520
1581
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"generatedFrom": "source-tree",
|
|
4
4
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
5
|
-
"packageVersion": "1.3.
|
|
5
|
+
"packageVersion": "1.3.2022",
|
|
6
6
|
"guards": [
|
|
7
7
|
{
|
|
8
8
|
"ref": "docs/audits/phase-b/f10-triage.md",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sha256": "
|
|
2
|
+
"sha256": "820438463f7e06c0858fe232d82223290549d0209119b62413bc0d0d5da3207d",
|
|
3
3
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
4
|
-
"packageVersion": "1.3.
|
|
4
|
+
"packageVersion": "1.3.2022"
|
|
5
5
|
}
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-11-25T02:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-11-25T02:29:48.902Z",
|
|
5
|
+
"instarVersion": "1.3.2022",
|
|
6
6
|
"entryCount": 210,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"generatedFrom": "source-tree",
|
|
4
4
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
5
|
-
"packageVersion": "1.3.
|
|
5
|
+
"packageVersion": "1.3.2022",
|
|
6
6
|
"guards": [
|
|
7
7
|
{
|
|
8
8
|
"ref": "docs/audits/phase-b/f10-triage.md",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sha256": "
|
|
2
|
+
"sha256": "820438463f7e06c0858fe232d82223290549d0209119b62413bc0d0d5da3207d",
|
|
3
3
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
4
|
-
"packageVersion": "1.3.
|
|
4
|
+
"packageVersion": "1.3.2022"
|
|
5
5
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Interactive dashboard chats explain loading, an empty history response and failed history reads. A pending read explains what it is waiting for after ten seconds. History retry preserves the draft and received messages, shares an identical pending read, and cannot resume an unfinished send. A successful background history read clears a stale failure notice. Existing initial-open send recovery remains separate.
|
|
9
|
+
|
|
10
|
+
## What to Tell Your User
|
|
11
|
+
|
|
12
|
+
Opening a dashboard chat now explains whether messages are loading, none were returned, or the read failed. You can try the read again without losing your draft.
|
|
13
|
+
|
|
14
|
+
## Summary of New Capabilities
|
|
15
|
+
|
|
16
|
+
No new capability or setting. This repairs the existing chat's loading, empty and failure states.
|
|
17
|
+
|
|
18
|
+
## Evidence
|
|
19
|
+
|
|
20
|
+
Seven focused interactive-page regressions include actual delayed reads, empty and failed history, an eligible unfinished send, received messages during loading, background recovery, follower-first overlap and late results after navigation. The page/model files pass 98 tests. TypeScript and syntax checks pass; independent bounded source review concurs. A disposable browser exercise passed the five visible states and preserved the draft at desktop and phone sizes with invented data; no messages were sent. Complete verification and actual release remain separate.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Dashboard Chat History States: Side Effects
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Tier 1 reversible repair of the existing interactive Chats page. Loading, empty response and failed read become visible; retry reads history. It introduces no send, enrollment, approval or merge authority. Accounts and held features are untouched. Source work is isolated from current cached main ec9401e5bdf28ed5ab1ff13f88e0032cc7895fc6.
|
|
6
|
+
|
|
7
|
+
## Over-block
|
|
8
|
+
|
|
9
|
+
An existing pending history request prevents a second history retry or focus-triggered duplicate. It does not disable the composer or replace typed text. Navigation retains its normal behavior.
|
|
10
|
+
|
|
11
|
+
## Under-block
|
|
12
|
+
|
|
13
|
+
These states do not repair missing server history or certify that an empty result is complete. Wording states what was returned. Real rendering and release proof remain separate.
|
|
14
|
+
|
|
15
|
+
## Level of abstraction and signal versus authority
|
|
16
|
+
|
|
17
|
+
This is presentation of read outcomes, with request/view lifecycle invariants. No detector gains blocking authority. Existing browser signing, request limits, recovery and messaging authorities remain in place. Reference: docs/signal-vs-authority.md.
|
|
18
|
+
|
|
19
|
+
## Interactions
|
|
20
|
+
|
|
21
|
+
Initial page recovery can resume existing unfinished work through its existing path. The new history-retry action must never invoke that path. Focus and background history share or defer to an existing read. Background successful history must clear a stale failure notice. Per-view timers and late responses cannot mutate another chat. Messages received before the initial result remain visible. Unrelated send/status text and the draft remain separate.
|
|
22
|
+
|
|
23
|
+
## External surfaces
|
|
24
|
+
|
|
25
|
+
Visible chat-state wording and a retry button. The button uses the existing signed history GET. No new endpoint, browser approval, credentials, message write or server configuration. Static dashboard assets ship through the existing update path; no migration or new agent capability is introduced.
|
|
26
|
+
|
|
27
|
+
## Multi-machine posture
|
|
28
|
+
|
|
29
|
+
The page continues reading the existing pooled history routes and cross-tab broadcast results. It does not create a new state store or infer completeness from a local empty response. View-only pending state is ephemeral browser UI, not durable agent state. No cross-machine ownership authority changes.
|
|
30
|
+
|
|
31
|
+
## Rollback
|
|
32
|
+
|
|
33
|
+
Revert this page repair and its documentation/tests; no state migration is required. Session-storage unfinished messages are not deleted or rewritten by a history retry.
|
|
34
|
+
|
|
35
|
+
## Verification and independent review
|
|
36
|
+
|
|
37
|
+
Initial three missing-state tests failed against the unchanged source; the old-view test already passed. The first candidate passed four focused cases. Independent Sol source review then found retry invoking send recovery, focus duplicating a read, and stale failure after background recovery. Actual seeded-send and background-recovery regressions failed on the first candidate, then passed after correction. A final review found the reverse overlap ordering; the corrected per-view/path promise map and focus-first regression address it. Final targeted page/model run: 98 passed, zero failures. TypeScript no-emit, JavaScript syntax and diff checks pass. The independent reviewer concurred with the bounded final source and artifact after three source passes; no extra review round is planned. A fresh headless Chromium1255 exercise on a disposable local server passed loading, ten-second waiting, empty, failed and retry/recovered states at1280x728 and390x844, preserving the draft. It verified14 signed history/event GETs, accounted for2 intentional503 history failures, accepted2 ephemeral read reports, made0 message/other writes and had0 JavaScript errors. The owned browser exited and its PID was absent. Root inspected the private captures. Initial fixture startup failures and a strict error-accounting failure are retained; the final fixture corrected its missing static import and read-report handling. This is narrow synthetic UI evidence, not live account history or whole-screen layout approval. Full suite is delegated to throughput, never claimed here.
|
|
38
|
+
|
|
39
|
+
## Class-Closure Declaration
|
|
40
|
+
|
|
41
|
+
Defect class unbounded-self-action, closure n/a: no autonomous controller or new external action. The ten-second timer only changes explanation and is cancelled at view/read completion.
|