Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ jobs:
- name: Run plugin unit tests
run: flutter test

# 发版版本串一致性(pubspec / podspec / inspector_version / README / CHANGELOG)
# Release version-string consistency (pubspec / podspec / inspector_version / README / CHANGELOG)
- name: Check release version consistency
run: dart run tool/check_release.dart

# ========== Example 应用 / Example app ==========

- name: Install example dependencies
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.12.0

### Added / 新增
- 统一会话时间线 `TimelineViewer`(面板首个 Tab):把网络 / 日志 / 异常 / 路由 / 告警五类数据按时间归并成一条流(`TimelineService.build`),可逐来源筛选,点任意事件即「聚焦它前后 ±N 秒」的全部来源事件(`TimelineService.contextAround`,默认 10s,可切 5/30s),一眼看清因果(如「路由跳转 → 两个请求 → error 日志 → 5xx 告警」)。数据仍归属各自服务,视图只做归并,面板未打开时零开销。 / Unified session timeline `TimelineViewer` (first panel tab): merges network / logs / errors / routes / alerts into one time-ordered stream (`TimelineService.build`), with per-source filtering and a "focus ±N seconds around any event" mode (`TimelineService.contextAround`, default 10s, toggle 5/30s) to see causality at a glance (e.g. "route push → two requests → error log → 5xx alert"). Data still lives in its own service; the view only merges, costing nothing while the panel is closed.
- 主线程阻塞看门狗(FPS 页内 `BlockingWatchdogCard`):用一个 100ms 低频心跳直接测量 UI isolate 的响应间隔,默认关闭、在 FPS 页内有独立开关(不随 FPS 总开关联动,不开启则零开销)。超过 300ms 无响应即记录一条阻塞事件(时长 / 时间 / 附近日志),专门补上 FPS 的盲区——真正卡死时不产帧、FPS 反而显示空闲。 / Main-thread blocking watchdog (`BlockingWatchdogCard` inside the FPS tab): a 100ms low-frequency heartbeat measures the UI isolate's responsiveness directly, off by default with its own switch (not tied to the FPS master switch, so it costs nothing unless you opt in). A gap past 300ms records a blocking event (duration / time / nearby logs), closing the FPS blind spot where a real stall produces no frames and FPS reads as idle.
- 发版版本一致性自检 `tool/check_release.dart`(及 `test/version_consistency_test.dart`):以 `pubspec.yaml` 的 `version` 为唯一真值,核对 podspec、`InspectorVersion.value`、两个 README 的安装片段与升级提示、`CHANGELOG.md` 顶部是否一致,并在 CI 的 `Analyze & Test` 之后单独一步拦截版本漂移。 / Release version-consistency self-check `tool/check_release.dart` (and `test/version_consistency_test.dart`): takes `pubspec.yaml`'s `version` as the single source of truth and verifies the podspec, `InspectorVersion.value`, both READMEs' install snippets and upgrade callouts, and the top of `CHANGELOG.md`; CI runs it as its own step after `Analyze & Test` to block version drift.

### Fixed / 修复
- `runAppWithInspector` 在 Flutter binding 已被调用方(外层 Zone)初始化时不再崩溃:此前只要调用方按常规先 `WidgetsFlutterBinding.ensureInitialized()` 或 `await` 了会触发 platform channel 的插件(如 `SharedPreferences`),就会抛 "Zone mismatch" 断言。现已探测 binding 状态,命中则跳过 Zone 包裹、降级为直接 `runApp`(debugPrint 日志仍捕获,仅 `print` 直出不捕获)并打一次提示。 / `runAppWithInspector` no longer crashes when the Flutter binding was already initialized by the caller (outer Zone): previously, any caller that ran `WidgetsFlutterBinding.ensureInitialized()` or awaited a platform-channel plugin (e.g. `SharedPreferences`) first hit a "Zone mismatch" assertion. It now detects the binding state and degrades to a plain `runApp` (debugPrint logs still captured, only raw print() not), logging one notice.

## 1.11.1

### Fixed / 修复
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ An in-app developer console for Flutter: inspect HTTP, WebSocket & gRPC traffic,
[![Dart](https://img.shields.io/badge/Dart-✓-0175C2?logo=dart)](https://dart.dev)
[![Style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://pub.dev/packages/effective_dart)

> **🔔 Upgrade recommended:** This release fixes route arguments being cast directly to `Map`, which threw a `TypeError` for any non-Map argument (custom page-argument classes, data models, or `Map<String, Object>` literals) and aborted host-app navigation. Arguments are now normalized defensively (null kept / Map copied with String keys / JSON-expanded / `toString` fallback), and `_logRoute` is wrapped so an inspector failure can never break navigation again. All users are encouraged to upgrade to the latest version (`^1.11.1`).
> **🔔 Upgrade recommended:** This release adds a unified session timeline and a main-thread blocking watchdog (catches stalls invisible to FPS); `runAppWithInspector` also degrades gracefully instead of crashing with "Zone mismatch" when the binding is pre-initialized. All users are encouraged to upgrade to the latest version (`^1.12.0`).

🌐 **[Official Website](https://www.zerolabsco.com/)** &nbsp;·&nbsp; 📦 **[View on pub.dev](https://pub.dev/packages/zero_inspector_kit)** &nbsp;·&nbsp; 🔗 **[View on GitHub](https://github.com/zero-labsco/zero_inspector_kit)**

Expand Down Expand Up @@ -102,7 +102,7 @@ An in-app developer console for Flutter: inspect HTTP, WebSocket & gRPC traffic,

```yaml
dependencies:
zero_inspector_kit: ^1.11.1
zero_inspector_kit: ^1.12.0
```

### GitHub
Expand All @@ -112,7 +112,7 @@ dependencies:
zero_inspector_kit:
git:
url: https://github.com/zero-labsco/zero_inspector_kit.git
ref: release/v1.11.1 # replace 1.11.1 with the version you need
ref: release/v1.12.0 # replace 1.12.0 with the version you need
```

---
Expand Down
6 changes: 3 additions & 3 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[![Dart](https://img.shields.io/badge/Dart-✓-0175C2?logo=dart)](https://dart.dev)
[![Style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://pub.dev/packages/effective_dart)

> **🔔 推荐升级:** 本次修复了路由参数被直接强转为 `Map` 的问题——任何非 Map 参数(自定义页面参数类、数据模型,或推断为 `Map<String, Object>` 的字面量)都会抛出 `TypeError` 并中断宿主 App 的导航;现已改为防御式归一化(null 保持 / Map 做 String 键浅拷贝 / 尽量经 JSON 展开 / 否则 `toString`),并将 `_logRoute` 包裹保护,检查器自身出错也绝不会再中断导航。建议所有用户升级到最新版本(`^1.11.1`)。
> **🔔 推荐升级:** 本版本新增统一会话时间线,以及在 FPS 之下看不见的「零帧卡死」主线程阻塞看门狗;当 binding 已被预先初始化时,`runAppWithInspector` 不再以 "Zone mismatch" 崩溃,而是优雅降级。建议所有用户升级到最新版本(`^1.12.0`)。

🌐 **[官方网站](https://www.zerolabsco.com/)** &nbsp;·&nbsp; 📦 **[在 pub.dev 查看](https://pub.dev/packages/zero_inspector_kit)** &nbsp;·&nbsp; 🔗 **[查看 GitHub 仓库](https://github.com/zero-labsco/zero_inspector_kit)**

Expand Down Expand Up @@ -101,7 +101,7 @@

```yaml
dependencies:
zero_inspector_kit: ^1.11.1
zero_inspector_kit: ^1.12.0
```

### GitHub
Expand All @@ -111,7 +111,7 @@ dependencies:
zero_inspector_kit:
git:
url: https://github.com/zero-labsco/zero_inspector_kit.git
ref: release/v1.11.1 # 将 1.11.1 替换为你需要的版本号
ref: release/v1.12.0 # 将 1.12.0 替换为你需要的版本号
```

---
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_inspector_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_inspector_kit/_next/static/chunks/webpack-ad90bb3f37d3ab33.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/main-f5dfbda958d94c6d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_app-dfead9b5b0a86c83.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/b7ivpfeuFIodlQxmXYCzo/_buildManifest.js" defer=""></script><script src="/zero_inspector_kit/_next/static/b7ivpfeuFIodlQxmXYCzo/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"b7ivpfeuFIodlQxmXYCzo","assetPrefix":"/zero_inspector_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_inspector_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_inspector_kit/_next/static/chunks/webpack-ad90bb3f37d3ab33.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/main-f5dfbda958d94c6d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_app-dfead9b5b0a86c83.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/SozSnA7VxY0DQRMRZIWM2/_buildManifest.js" defer=""></script><script src="/zero_inspector_kit/_next/static/SozSnA7VxY0DQRMRZIWM2/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"SozSnA7VxY0DQRMRZIWM2","assetPrefix":"/zero_inspector_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
2 changes: 1 addition & 1 deletion docs/404/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_inspector_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_inspector_kit/_next/static/chunks/webpack-ad90bb3f37d3ab33.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/main-f5dfbda958d94c6d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_app-dfead9b5b0a86c83.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/b7ivpfeuFIodlQxmXYCzo/_buildManifest.js" defer=""></script><script src="/zero_inspector_kit/_next/static/b7ivpfeuFIodlQxmXYCzo/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"b7ivpfeuFIodlQxmXYCzo","assetPrefix":"/zero_inspector_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_inspector_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_inspector_kit/_next/static/chunks/webpack-ad90bb3f37d3ab33.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/main-f5dfbda958d94c6d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_app-dfead9b5b0a86c83.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/SozSnA7VxY0DQRMRZIWM2/_buildManifest.js" defer=""></script><script src="/zero_inspector_kit/_next/static/SozSnA7VxY0DQRMRZIWM2/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"SozSnA7VxY0DQRMRZIWM2","assetPrefix":"/zero_inspector_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
4 changes: 2 additions & 2 deletions docs/Alerts/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Configuration/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Custom-Database-Provider/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Database-Viewer/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Errors/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/FAQ/index.html

Large diffs are not rendered by default.

20 changes: 18 additions & 2 deletions docs/FPS-Viewer/index.html

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions docs/Getting-Started/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/Installation/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Log-Viewer/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Memory-Viewer/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Network-Inspector/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Route-Tracker/index.html

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions docs/Timeline/index.html

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions docs/Usage/index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/_next/static/SozSnA7VxY0DQRMRZIWM2/_buildManifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading