Integrate master agent runtime orchestration updates
This commit is contained in:
@@ -34,4 +34,75 @@ test("ProjectDetailActivity applies lightweight realtime chat payloads before sc
|
||||
/renderLoadedProjectSnapshot\(new ProjectSnapshot\(projectMessagesPayload,\s*null,\s*null\)\);/,
|
||||
"expected chat page to render the local realtime payload without forcing a network request",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/JSONArray executionWarnings = projectMessagesPayload\.optJSONArray\("executionWarnings"\);/,
|
||||
"expected chat page to read executionWarnings from the lightweight realtime payload",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/LinearLayout statusRow = BossUi\.buildMessageStatusRow\(this, message, conversationTask, messageWarnings, outgoing\);/,
|
||||
"expected each rendered message to create a compact status row",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/private List<JSONObject> buildMessageWarnings\(JSONObject payload, String messageId\)/,
|
||||
"expected a helper returning grouped warnings per message",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/if \(!TextUtils\.equals\(currentFingerprint,\s*nextFingerprint\)\) \{/,
|
||||
"expected realtime warning patches to branch on fingerprint differences before replacing views",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/replaceMessageViewById\(messageId,\s*buildMessageView\(message\)\);/,
|
||||
"expected realtime warning patches to replace only the affected message after fingerprint differences",
|
||||
);
|
||||
const warningPatchMethod = source.match(
|
||||
/private boolean tryPatchRealtimeExecutionWarnings\(JSONObject projectMessagesPayload\) \{[\s\S]*?\n \}/,
|
||||
);
|
||||
assert.ok(warningPatchMethod, "expected to locate the warning patch helper body");
|
||||
const snapshotSwapCount =
|
||||
warningPatchMethod[0].match(/currentRenderedProjectPayload = nextPayloadCopy;/g)?.length ?? 0;
|
||||
assert.equal(
|
||||
snapshotSwapCount,
|
||||
1,
|
||||
"expected warning patch helper to swap the rendered payload only once after all message diffs are processed",
|
||||
);
|
||||
});
|
||||
|
||||
test("BossUi keeps a detail-only message status row visible", async () => {
|
||||
const source = await readSource("../android/app/src/main/java/com/hyzq/boss/BossUi.java");
|
||||
|
||||
assert.match(
|
||||
source,
|
||||
/boolean hasDetail = !TextUtils\.isEmpty\(detailText\);/,
|
||||
"expected message status rows to detect detail-only status text",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/if \(!hasTask && !hasWarnings && !hasDetail\) \{\s*row\.setVisibility\(View\.GONE\);\s*return row;\s*\}/,
|
||||
"expected message status rows to stay visible whenever detail text exists",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/if \(hasDetail\) \{\s*TextView detailView = new TextView\(context\);/,
|
||||
"expected detail-only rows to still render their muted status text",
|
||||
);
|
||||
});
|
||||
|
||||
test("ProjectDetailActivity bypasses realtime message-only patching when group dispatch or repair state is active", async () => {
|
||||
const source = await readSource("../android/app/src/main/java/com/hyzq/boss/ProjectDetailActivity.java");
|
||||
|
||||
assert.match(
|
||||
source,
|
||||
/if \(shouldBypassRealtimeMessagesPatchForGroupState\(\)\) \{\s*return false;\s*\}/,
|
||||
"expected realtime message patching to fall back to a full reload when group dispatch or repair state could be stale",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/private boolean shouldBypassRealtimeMessagesPatchForGroupState\(\) \{/,
|
||||
"expected a dedicated helper guarding the fast patch path for group-only state",
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user