fix: render reasoning at full sidebar width with Markdown #7

Merged
BlackHatMagic merged 1 commit from fix/reasoning into master 2026-10-30 09:13:54 +00:00

Summary

Fix the tall, narrow reasoning column shown in the reported screenshot:

  • The reasoning dropdown and transcript <details> both used .pi-chat-thinking. The dropdown's max-width: 110px (88px below 360px) therefore constrained the entire reasoning transcript. Give the dropdown a separate .pi-chat-thinking-select class at both breakpoints.
  • Render completed reasoning through Obsidian's Markdown renderer, matching assistant text, rather than leaving **bold** and other Markdown literal. Keep streaming text incremental and pre-wrap; remove that whitespace mode when rendering Markdown.
  • Add headless Chromium regressions against the actual view and stylesheet, with a minimal Obsidian host stub. Cover 463/360/320px widths, compact selector, no horizontal overflow, in-place streaming updates, and Markdown handoff on completion.
  • Prepare patch release 0.4.2, keeping Obsidian minimum version 1.5.0.

Validation

  • bun install --frozen-lockfile — pass
  • CHROMIUM_PATH=/usr/bin/chromium bun run check — typecheck + 41 tests passed, 0 failed
  • bun run build — pass
  • git diff --check — pass
  • Self-review completed against master.

Risks / limitations

Browser regressions exercise real Chromium layout but stub the Obsidian host API and Markdown renderer. They verify that reasoning reaches Obsidian's existing rendering pipeline; they do not independently validate Obsidian Markdown or community themes. Playwright is dev-only; browser installation/system-browser instructions are in README.

## Summary Fix the tall, narrow reasoning column shown in the reported screenshot: - The reasoning dropdown and transcript `<details>` both used `.pi-chat-thinking`. The dropdown's `max-width: 110px` (88px below 360px) therefore constrained the entire reasoning transcript. Give the dropdown a separate `.pi-chat-thinking-select` class at both breakpoints. - Render completed reasoning through Obsidian's Markdown renderer, matching assistant text, rather than leaving `**bold**` and other Markdown literal. Keep streaming text incremental and `pre-wrap`; remove that whitespace mode when rendering Markdown. - Add headless Chromium regressions against the actual view and stylesheet, with a minimal Obsidian host stub. Cover 463/360/320px widths, compact selector, no horizontal overflow, in-place streaming updates, and Markdown handoff on completion. - Prepare patch release 0.4.2, keeping Obsidian minimum version 1.5.0. ## Validation - `bun install --frozen-lockfile` — pass - `CHROMIUM_PATH=/usr/bin/chromium bun run check` — typecheck + 41 tests passed, 0 failed - `bun run build` — pass - `git diff --check` — pass - Self-review completed against master. ## Risks / limitations Browser regressions exercise real Chromium layout but stub the Obsidian host API and Markdown renderer. They verify that reasoning reaches Obsidian's existing rendering pipeline; they do not independently validate Obsidian Markdown or community themes. Playwright is dev-only; browser installation/system-browser instructions are in README.
Code-Reviewer left a comment

Pi code review

0 new actionable findings

No new actionable findings. Previously reported issues, if any, are tracked below.

Aggregated the three candidate reviews of head b7d50f1 against base bd861ec, covering reasoning layout, Markdown handoff, streaming behavior, browser tests, documentation, and release metadata; no evidence-supported introduced bugs were identified. This aggregation did not run tests, typechecks, builds, or live Obsidian/theme checks, and the browser tests use a stubbed Obsidian host and Markdown renderer.

Change walkthrough
Area Files Changes
Other code (4) src/chat-view.ts, styles.css, manifest.json, versions.json Separates the reasoning dropdown class and renders completed reasoning through the existing Markdown pipeline while retaining incremental streaming text. Scopes compact width limits to the reasoning dropdown and removes pre-wrap from completed reasoning. Bumps the plugin version to 0.4.2 while retaining the minimum Obsidian version of 1.5.0. Adds the 0.4.2 minimum-app-version mapping.
Tests (4) tests/chat-view.test.ts, tests/fixtures/chat-view.ts, tests/fixtures/obsidian.ts, tests/fixtures/crypto.ts Adds Chromium regressions for sidebar widths, selector sizing, overflow, in-place streaming, and Markdown handoff. Adds a browser harness around the real chat view with controlled session state. Provides minimal Obsidian and DOM API stubs, including Markdown-renderer call tracking. Supplies a browser-compatible UUID implementation for the test bundle.
Deployment & tooling (2) package.json, bun.lock Adds Playwright as a development dependency and bumps the package version to 0.4.2. Locks the new Playwright dependencies.
Documentation (1) README.md Documents browser-test setup, system Chromium selection, and host-stub limitations.

Review effort: 3/5.

Static observations (not validation results)
Observation Detail
Diff size 11 files, +232/-11.
Binary changes No binary changes reported by this diff.
Credential patterns No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit.

Reviewed b7d50f12a09ee5c0b6c896612179871194529ca4 with proxy/glm-5.3-flash + proxy/deepseek-v4.1-flash + proxy/gpt-6.1-sol → proxy/gpt-6.1-sol. Automated advisory review; no project commands or tests were executed.

<!-- forgejo-pi-review:9b98363476f79818df481e367aeb1c3eaaec539db942a9012674bd00035c7634 --> ## Pi code review **0 new actionable findings** No new actionable findings. Previously reported issues, if any, are tracked below. Aggregated the three candidate reviews of head b7d50f1 against base bd861ec, covering reasoning layout, Markdown handoff, streaming behavior, browser tests, documentation, and release metadata; no evidence-supported introduced bugs were identified. This aggregation did not run tests, typechecks, builds, or live Obsidian/theme checks, and the browser tests use a stubbed Obsidian host and Markdown renderer. <details> <summary>Change walkthrough</summary> | Area | Files | Changes | | --- | --- | --- | | Other code (4) | `src/chat-view.ts`, `styles.css`, `manifest.json`, `versions.json` | Separates the reasoning dropdown class and renders completed reasoning through the existing Markdown pipeline while retaining incremental streaming text. Scopes compact width limits to the reasoning dropdown and removes pre-wrap from completed reasoning. Bumps the plugin version to 0.4.2 while retaining the minimum Obsidian version of 1.5.0. Adds the 0.4.2 minimum-app-version mapping. | | Tests (4) | `tests/chat-view.test.ts`, `tests/fixtures/chat-view.ts`, `tests/fixtures/obsidian.ts`, `tests/fixtures/crypto.ts` | Adds Chromium regressions for sidebar widths, selector sizing, overflow, in-place streaming, and Markdown handoff. Adds a browser harness around the real chat view with controlled session state. Provides minimal Obsidian and DOM API stubs, including Markdown-renderer call tracking. Supplies a browser-compatible UUID implementation for the test bundle. | | Deployment & tooling (2) | `package.json`, `bun.lock` | Adds Playwright as a development dependency and bumps the package version to 0.4.2. Locks the new Playwright dependencies. | | Documentation (1) | `README.md` | Documents browser-test setup, system Chromium selection, and host-stub limitations. | Review effort: **3/5**. </details> <details> <summary>Static observations (not validation results)</summary> | Observation | Detail | | --- | --- | | Diff size | 11 files, +232/-11. | | Binary changes | No binary changes reported by this diff. | | Credential patterns | No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit. | </details> --- Reviewed `b7d50f12a09ee5c0b6c896612179871194529ca4` with `proxy/glm-5.3-flash + proxy/deepseek-v4.1-flash + proxy/gpt-6.1-sol → proxy/gpt-6.1-sol`. Automated advisory review; no project commands or tests were executed.
Author
Owner

Review monitoring complete: Code-Reviewer reviewed current head b7d50f12a0 with 0 actionable findings. Local typecheck, all 41 tests (including Chromium layout/streaming regressions), production build, and diff checks pass. No remote commit statuses are configured/reported. Merging and preparing release 0.4.2 as requested.

Review monitoring complete: Code-Reviewer reviewed current head b7d50f12a09ee5c0b6c896612179871194529ca4 with 0 actionable findings. Local typecheck, all 41 tests (including Chromium layout/streaming regressions), production build, and diff checks pass. No remote commit statuses are configured/reported. Merging and preparing release 0.4.2 as requested.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
BlackHatMagic/Pi-Obsidian!7
No description provided.