Skip to content

v0.14.3 §9.5 — CaptureHealthCard chain-health tier split - #16

Merged
guan4tou2 merged 1 commit into
mainfrom
feat/settings-chain-health-logged
Aug 19, 2026
Merged

guan4tou2 merged 1 commit into
mainfrom
feat/settings-chain-health-logged

Conversation

@guan4tou2

Copy link
Copy Markdown
Owner

Summary

Closes the last v0.14 spec deviation (§9.5 in DESIGN-two-tier-chain.md). Dashboard's capture card grows a footer showing chained · logged tier split plus "last fed" age of the newest logged-tier row — operators can spot at a glance whether logged-tier producers (mitmproxy DNS, browser console, file watcher, process monitor) are actually feeding data vs silently idle.

  • New `getLatestLoggedTs()` helper in `db/events.ts` — single `SELECT MAX(timestamp) FROM events_logged`, no row bodies pulled.
  • New IPC `events:getLatestLoggedTs` + preload binding + `env.d.ts`.
  • `CaptureHealthCard` gains optional `tierSplit` prop; footer renders only when logged > 0 (pre-v0.13 projects and empty engagements stay visually identical).
  • Freshness ticks smoothly via the existing 1s `nowTick`; age colour scales green <60s → amber <5min → zinc.
  • +1 unit test in `test/db/logged-insert.test.ts` — null on empty, tracks newest write, ignores chained writes.

Test plan

  • `npx vitest run test/db/logged-insert.test.ts` — 8/8
  • full local suite — 633/633
  • CI green on Ubuntu + Windows
  • Dogfood-verify from the v0.14.3 DMG (footer only appears when logged rows exist; not visible in Test-Engagement which has zero logged rows)

Closes the last v0.14 spec deviation. Dashboard's capture card grows a
footer showing chained · logged tier split plus 'last fed' age of the
newest logged-tier row — operators see at a glance whether logged-tier
producers (mitmproxy DNS, browser console, file watcher, process
monitor) are actually feeding data.

- getLatestLoggedTs() in db/events.ts — single SELECT MAX(timestamp)
- new IPC events:getLatestLoggedTs + preload binding + env.d.ts
- CaptureHealthCard tierSplit prop; footer renders only when logged > 0
- +1 unit test locking the freshness helper's semantics
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 11626596-cec1-411f-88fd-65df4a76e5da


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@guan4tou2
guan4tou2 merged commit a495ee9 into main Aug 19, 2026
4 of 5 checks passed
@guan4tou2
guan4tou2 deleted the feat/settings-chain-health-logged branch August 19, 2026 15:58
guan4tou2 added a commit that referenced this pull request Aug 23, 2026
Seven P1 findings from the UI/UX audit, batched:

  • #15 HUD auto-collapse now pauses while the pointer is on the overlay
    (audit was: hard 8s timer, no way to keep it open while reading the
    topology chain / Reveal button).
  • #16 Terminal tab labels ("Shell 1", "Shell 2" …) used tabs.length + 1
    → duplicated after any close. Now uses a monotonic counter.
  • #17 Closing a terminal tab kills the PTY silently. Now confirms via
    ConfirmDialog when the tab is still alive (matches ProjectPicker
    delete pattern).
  • #21 Settings CDP test callback had a `const tab = ...` shadowing the
    outer `tab` state (settings tab name). Renamed to `cdpTab`.
  • #28-29 EventMarker showed raw enum strings ("info" / "initial_access")
    for severity + category — now i18n'd (marker.severity.*, marker.
    category.*). Also added an opt-out "Capture screenshot too" checkbox
    (default on) so a mark taken over sensitive UI doesn't force a capture.
  • #30 EventMarker gained role="dialog", aria-modal, aria-label, and an
    Escape-to-close handler on the backdrop. Autofocus lands on the dialog
    body so keyboard users have a hook.
  • #32 App title-bar Mark button title="Ctrl+Shift+M" was hardcoded —
    Mac users saw the wrong hint. Uses isMac to pick ⌘⇧M vs Ctrl+Shift+M.

Deferred (need bigger refactors): #9-14/#49-50 shared IPC store to stop
per-event refetches across StatusBar/Sidebar/Dashboard/LootPanel/TargetView/
ScopeStatus; #22-24 sidebar keyboard drag; #25-27 FindingsView/SearchPanel/
LootPanel interactive; #33 uptime should be engagement-scoped not window-
scoped; #34 StatusBar record toggle button styling; #37-38 timeline layout
constraints. All queued for the next batch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
guan4tou2 added a commit that referenced this pull request Aug 23, 2026
… pin

- Built-in Terminal now records complete stdout onto shell.command_end events.
  Per-command output buffer in terminal-manager, drained by api-server on
  command_end (source=builtin-terminal). Redaction still applies. Capped at
  256 KB per command with output_truncated flag; the .cast file remains the
  full record for anything larger.
- Shell hook: command_end now carries data.cwd so downstream views can show
  where a command ran without joining across events.
- Timeline (audit #3): scrolling to the earliest edge auto-triggers loadMore
  instead of requiring the "load more" chip click.
- Terminal tabs (audit #16): live label now shows ~/<cwd basename> and
  ✕<code> when the last command failed, driven off command_end events.
- Findings Marks: pin toggle floats important marks to the top; state
  persisted in localStorage (chain-immutable events stay unchanged).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
guan4tou2 added a commit that referenced this pull request Aug 23, 2026
v0.14.3 §9.5 — CaptureHealthCard chain-health tier split
guan4tou2 added a commit that referenced this pull request Sep 19, 2026
…erlay 型別

- capture-health: stripCreds 去除 proxy URL 中的 userinfo (#14)
- StatusBar: mount 時無 recording 立即設 pausedAt,修正計時器歸零 (#16)
- EventMarker: Cmd+Enter 加 stopPropagation + saving guard 防 double-save (#17)
- TimelineEventDetails: allLoaded guard 防分頁邊界的假 tool no-result 警告 (#18)
- TerminalView: cast 截斷後即時推送 castState,badge 立即更新 (#19)
- TranscriptView: tool result 加 AI-generated disclaimer、長 pending ⏳ 指示
- overlay preload: IPStatus 型別同步 (isAllowed → ipSafety + link)
- 移除誤加的 display info 功能 (revert task #13)
- launch.json: 移除 --remote-allow-origins=* (#15)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
guan4tou2 added a commit that referenced this pull request Oct 8, 2026
Seven P1 findings from the UI/UX audit, batched:

  • #15 HUD auto-collapse now pauses while the pointer is on the overlay
    (audit was: hard 8s timer, no way to keep it open while reading the
    topology chain / Reveal button).
  • #16 Terminal tab labels ("Shell 1", "Shell 2" …) used tabs.length + 1
    → duplicated after any close. Now uses a monotonic counter.
  • #17 Closing a terminal tab kills the PTY silently. Now confirms via
    ConfirmDialog when the tab is still alive (matches ProjectPicker
    delete pattern).
  • #21 Settings CDP test callback had a `const tab = ...` shadowing the
    outer `tab` state (settings tab name). Renamed to `cdpTab`.
  • #28-29 EventMarker showed raw enum strings ("info" / "initial_access")
    for severity + category — now i18n'd (marker.severity.*, marker.
    category.*). Also added an opt-out "Capture screenshot too" checkbox
    (default on) so a mark taken over sensitive UI doesn't force a capture.
  • #30 EventMarker gained role="dialog", aria-modal, aria-label, and an
    Escape-to-close handler on the backdrop. Autofocus lands on the dialog
    body so keyboard users have a hook.
  • #32 App title-bar Mark button title="Ctrl+Shift+M" was hardcoded —
    Mac users saw the wrong hint. Uses isMac to pick ⌘⇧M vs Ctrl+Shift+M.

Deferred (need bigger refactors): #9-14/#49-50 shared IPC store to stop
per-event refetches across StatusBar/Sidebar/Dashboard/LootPanel/TargetView/
ScopeStatus; #22-24 sidebar keyboard drag; #25-27 FindingsView/SearchPanel/
LootPanel interactive; #33 uptime should be engagement-scoped not window-
scoped; #34 StatusBar record toggle button styling; #37-38 timeline layout
constraints. All queued for the next batch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
guan4tou2 added a commit that referenced this pull request Oct 8, 2026
… pin

- Built-in Terminal now records complete stdout onto shell.command_end events.
  Per-command output buffer in terminal-manager, drained by api-server on
  command_end (source=builtin-terminal). Redaction still applies. Capped at
  256 KB per command with output_truncated flag; the .cast file remains the
  full record for anything larger.
- Shell hook: command_end now carries data.cwd so downstream views can show
  where a command ran without joining across events.
- Timeline (audit #3): scrolling to the earliest edge auto-triggers loadMore
  instead of requiring the "load more" chip click.
- Terminal tabs (audit #16): live label now shows ~/<cwd basename> and
  ✕<code> when the last command failed, driven off command_end events.
- Findings Marks: pin toggle floats important marks to the top; state
  persisted in localStorage (chain-immutable events stay unchanged).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
guan4tou2 added a commit that referenced this pull request Oct 8, 2026
v0.14.3 §9.5 — CaptureHealthCard chain-health tier split
guan4tou2 added a commit that referenced this pull request Oct 8, 2026
…erlay 型別

- capture-health: stripCreds 去除 proxy URL 中的 userinfo (#14)
- StatusBar: mount 時無 recording 立即設 pausedAt,修正計時器歸零 (#16)
- EventMarker: Cmd+Enter 加 stopPropagation + saving guard 防 double-save (#17)
- TimelineEventDetails: allLoaded guard 防分頁邊界的假 tool no-result 警告 (#18)
- TerminalView: cast 截斷後即時推送 castState,badge 立即更新 (#19)
- TranscriptView: tool result 加 AI-generated disclaimer、長 pending ⏳ 指示
- overlay preload: IPStatus 型別同步 (isAllowed → ipSafety + link)
- 移除誤加的 display info 功能 (revert task #13)
- launch.json: 移除 --remote-allow-origins=* (#15)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
guan4tou2 added a commit that referenced this pull request Oct 8, 2026
Seven P1 findings from the UI/UX audit, batched:

  • #15 HUD auto-collapse now pauses while the pointer is on the overlay
    (audit was: hard 8s timer, no way to keep it open while reading the
    topology chain / Reveal button).
  • #16 Terminal tab labels ("Shell 1", "Shell 2" …) used tabs.length + 1
    → duplicated after any close. Now uses a monotonic counter.
  • #17 Closing a terminal tab kills the PTY silently. Now confirms via
    ConfirmDialog when the tab is still alive (matches ProjectPicker
    delete pattern).
  • #21 Settings CDP test callback had a `const tab = ...` shadowing the
    outer `tab` state (settings tab name). Renamed to `cdpTab`.
  • #28-29 EventMarker showed raw enum strings ("info" / "initial_access")
    for severity + category — now i18n'd (marker.severity.*, marker.
    category.*). Also added an opt-out "Capture screenshot too" checkbox
    (default on) so a mark taken over sensitive UI doesn't force a capture.
  • #30 EventMarker gained role="dialog", aria-modal, aria-label, and an
    Escape-to-close handler on the backdrop. Autofocus lands on the dialog
    body so keyboard users have a hook.
  • #32 App title-bar Mark button title="Ctrl+Shift+M" was hardcoded —
    Mac users saw the wrong hint. Uses isMac to pick ⌘⇧M vs Ctrl+Shift+M.

Deferred (need bigger refactors): #9-14/#49-50 shared IPC store to stop
per-event refetches across StatusBar/Sidebar/Dashboard/LootPanel/TargetView/
ScopeStatus; #22-24 sidebar keyboard drag; #25-27 FindingsView/SearchPanel/
LootPanel interactive; #33 uptime should be engagement-scoped not window-
scoped; #34 StatusBar record toggle button styling; #37-38 timeline layout
constraints. All queued for the next batch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
guan4tou2 added a commit that referenced this pull request Oct 8, 2026
… pin

- Built-in Terminal now records complete stdout onto shell.command_end events.
  Per-command output buffer in terminal-manager, drained by api-server on
  command_end (source=builtin-terminal). Redaction still applies. Capped at
  256 KB per command with output_truncated flag; the .cast file remains the
  full record for anything larger.
- Shell hook: command_end now carries data.cwd so downstream views can show
  where a command ran without joining across events.
- Timeline (audit #3): scrolling to the earliest edge auto-triggers loadMore
  instead of requiring the "load more" chip click.
- Terminal tabs (audit #16): live label now shows ~/<cwd basename> and
  ✕<code> when the last command failed, driven off command_end events.
- Findings Marks: pin toggle floats important marks to the top; state
  persisted in localStorage (chain-immutable events stay unchanged).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
guan4tou2 added a commit that referenced this pull request Oct 8, 2026
v0.14.3 §9.5 — CaptureHealthCard chain-health tier split
guan4tou2 added a commit that referenced this pull request Oct 8, 2026
…erlay 型別

- capture-health: stripCreds 去除 proxy URL 中的 userinfo (#14)
- StatusBar: mount 時無 recording 立即設 pausedAt,修正計時器歸零 (#16)
- EventMarker: Cmd+Enter 加 stopPropagation + saving guard 防 double-save (#17)
- TimelineEventDetails: allLoaded guard 防分頁邊界的假 tool no-result 警告 (#18)
- TerminalView: cast 截斷後即時推送 castState,badge 立即更新 (#19)
- TranscriptView: tool result 加 AI-generated disclaimer、長 pending ⏳ 指示
- overlay preload: IPStatus 型別同步 (isAllowed → ipSafety + link)
- 移除誤加的 display info 功能 (revert task #13)
- launch.json: 移除 --remote-allow-origins=* (#15)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant