shine-code-submit 1.0.2 → 1.0.3

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.
@@ -67,10 +67,12 @@ export function ReportModule() {
67
67
  method: "POST",
68
68
  headers: { Authorization: `Bearer ${token}` },
69
69
  });
70
- if (r.ok) {
70
+ const j = await r.json().catch(() => ({}));
71
+ if (r.ok && j.status === "ok") {
71
72
  setUploadResult({ ok: true, text: "上报成功" });
73
+ } else if (r.ok && j.status === "skipped") {
74
+ setUploadResult({ ok: false, text: `已跳过:${j.reason ?? "无 git 身份"}` });
72
75
  } else {
73
- const j = await r.json().catch(() => ({}));
74
76
  setUploadResult({ ok: false, text: j.error ?? `HTTP ${r.status}` });
75
77
  }
76
78
  } catch (e) {
package/ui/style.css CHANGED
@@ -17,7 +17,7 @@
17
17
  --c-prompt: #569cd6;
18
18
  --c-posttool: #c586c0;
19
19
  --c-pretool: #ce9178;
20
- --nav-w: 200px;
20
+ --nav-w: 98px;
21
21
  --tree-w: 200px;
22
22
  --footer-h: 170px;
23
23
  /* 设计 token:间距 / 字号 / 圆角 / 图标尺寸 */
@@ -170,7 +170,10 @@ h2 {
170
170
  }
171
171
  ul { list-style: none; margin: 0; padding: 0; }
172
172
 
173
- #nav-panel { flex: 0 0 auto; background: var(--sidebar); overflow: hidden; border-right: 1px solid var(--border); }
173
+ /* 固定宽度而非 flex: 0 0 auto:basis auto content max-content,
174
+ 超长会话触发大规模 reflow 时 Chromium 会重算 nav-item padding 导致 content 收缩,
175
+ 进而让整个导航栏/会话树左移错位。固定值消除对 reflow 的依赖。 */
176
+ #nav-panel { flex: 0 0 var(--nav-w); background: var(--sidebar); overflow: hidden; border-right: 1px solid var(--border); }
174
177
  #sessions-panel ul { flex: 1; overflow: auto; }
175
178
  #events-panel { flex: 1 1 0; overflow: hidden; }
176
179