Skip to content

monitor-test: add offline replay validation, white-screen detection flow, and reliability coverage gaps#16

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/test
Draft

monitor-test: add offline replay validation, white-screen detection flow, and reliability coverage gaps#16
Copilot wants to merge 6 commits intomainfrom
copilot/test

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

monitor-test was missing explicit validation paths for offline queue recovery and white-screen detection, and lacked a few practical reliability checks for parity with mature monitoring setups. This PR fills those gaps in the test portal with focused runtime hooks, UI controls, and documentation updates.

  • Offline recovery validation (Error page)

    • Added queue introspection from reporter localStorage (key, itemCount, savedAt, sample event types).
    • Added explicit controls to:
      • emit offline probe events,
      • manually flush persisted queue,
      • refresh queue snapshot.
    • Wired online/offline listeners to auto-attempt flush on reconnect and log recovery signals in-page.
  • White-screen detection validation (Error page)

    • Added reliability helpers with 18-point viewport sampling and container-hit ratio calculation.
    • Implemented thresholded detection loop (1s sampling, 6s sustained condition) and white-screen report path via reportError.
    • Added in-page simulation controls:
      • start/stop detector,
      • one-shot sampling,
      • 7s full-screen white mask trigger.
    • Added overlap guard to prevent concurrent async detection runs.
  • Missing reliability signal in performance scenarios

    • Added performance_interaction_delay manual sample action (rAF-based interaction latency probe) on Performance page to complement INP-oriented regression checks.
  • Runtime/build completeness

    • Added missing app/monitor-test/build/autoSourcemapUploadPlugin.ts referenced by Vite config, restoring monitor-test dev/build startup path.
  • Docs and portal wording

    • Updated monitor-test/README.md route capability and acceptance guidance for:
      • offline queue recovery flow,
      • white-screen validation flow,
      • interaction-delay coverage.
    • Updated Home/Error page copy to reflect newly covered capabilities.
// white-screen detector core (simplified)
const snapshot = collectWhiteScreenSnapshot(['#root', '.portal-shell'], ['.skeleton', '.loading', '[data-skeleton]'])
if (snapshot.ratio >= 0.95 && sustainedForMs >= 6000) {
  await reportError('white_screen', {
    message: 'Potential white screen detected in monitor-test',
    detail: { sample: snapshot, duration: sustainedForMs },
  })
}

monitor-test error page enhancements

Original prompt

test项目中我的离线重新恢复上传好像没有在里面,还有白屏检测也没有,帮我仔细去补充完善test项目,同时还要帮我看看有什么功能欠缺或者指标没有监控到的帮我搞好(去网上找优秀的开源监控系统去对标)

The user has attached the following file paths as relevant context:

  • .github\copilot-instructions.md

Created from VS Code.

Copilot AI changed the title [WIP] Update test project with offline recovery and white screen detection monitor-test: add offline replay validation, white-screen detection flow, and reliability coverage gaps Apr 17, 2026
Copilot AI requested a review from Ni0duann April 17, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants