• Will Chen's avatar
    Replace ChatLogsData with comprehensive SessionDebugBundle schema (#2488) · beeaef57
    Will Chen 提交于
    ## Summary
    - Replaces the old `ChatLogsDataSchema` with a new
    `SessionDebugBundleSchema` (schema version 1) that captures all
    non-sensitive data needed for debugging chat sessions
    - Each message now includes AI SDK JSON (with base64 images stripped),
    model name, token usage, timestamps, commit hashes, request ID, and
    approval state
    - Adds non-sensitive user settings snapshot, app metadata, custom
    provider/model definitions, and MCP server configurations to the debug
    bundle
    - Updates HelpDialog to use the new schema and adds `Session Schema:
    v2.0` marker to GitHub issue templates
    
    ## Test plan
    - [ ] Verify `npm run ts` passes (type-check)
    - [ ] Verify `npm run lint` passes
    - [ ] Verify `npm test` passes (all 661 unit tests)
    - [ ] Manual: Open Help dialog → Upload Chat Session → verify the review
    modal shows messages, codebase, logs, and system info correctly
    - [ ] Manual: Complete upload and verify the GitHub issue template
    includes `Session Schema: v2.0`
    - [ ] Manual: Download uploaded JSON and verify it contains:
    `schemaVersion`, `system`, `settings`, `app`, `chat` (with
    `aiMessagesJson` per message), `providers`, `mcpServers`, `codebase`,
    `logs`
    - [ ] Manual: Verify no API keys, OAuth tokens, or MCP env vars appear
    in uploaded data
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2488">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Medium Risk**
    > Expands what gets captured and uploaded for support sessions
    (settings/app metadata/providers/MCP and richer message data), so any
    sanitization or schema mismatch could leak data or break the support
    upload flow.
    > 
    > **Overview**
    > Switches chat-session uploads from `ChatLogsData` to a new versioned
    `SessionDebugBundle` (`SESSION_DEBUG_SCHEMA_VERSION = 2`) and updates
    the IPC contract/exports accordingly.
    > 
    > The main-process handler now assembles a comprehensive bundle
    (system/runtime info, sanitized settings snapshot, app metadata, full
    chat messages with stripped image/file blobs, custom provider/model
    summaries, MCP server configs without env/header secrets, codebase
    snapshot, and last ~1000 log lines), and `HelpDialog` is updated to
    fetch/review/upload this bundle and annotate created GitHub issues with
    `Session Schema: v2.0` (plus adds a settings section to the bug report
    template).
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    7b94199939aa6963787e8fe69716e20cd6570b7d. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    ---------
    Co-authored-by: 's avatarClaude Opus 4.5 <noreply@anthropic.com>
    beeaef57
名称
最后提交
最后更新
.claude 正在载入提交数据...
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
.storybook 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
makers 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
rules 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.npmrc 正在载入提交数据...
.oxfmtrc.json 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CLA.md 正在载入提交数据...
CLAUDE.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
lint-staged.config.js 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...
windowsSign.ts 正在载入提交数据...