Skip to content

Add Markdown preview and long-text expand option - #7

Merged
lRoccoon merged 5 commits into
mainfrom
feat/markdown-preview-and-long-text
May 22, 2026
Merged

lRoccoon merged 5 commits into
mainfrom
feat/markdown-preview-and-long-text

Conversation

@lRoccoon

Copy link
Copy Markdown
Owner

概要

详情弹窗与右侧树视图的长文本展示增强。

变更

  • ValuePopup · Markdown 预览:长文本详情弹窗新增 Markdown 选项,默认开启,按 Markdown 渲染(标题、加粗/斜体、行内 code、围栏代码块、列表、引用、hr、链接)。关闭后回退到原 <pre> 纯文本视图。
  • 无依赖 Markdown 渲染器src/utils/markdown.tsx):直接产出 React 节点,不使用 dangerouslySetInnerHTML;链接 URL 走白名单(http(s) / mailto / 相对路径),其余降级为纯文本。
  • JsonTree · 长文本开关:树视图工具栏新增「长文本:省略/展开」切换,默认「省略」(保持原 70ch 截断行为),切换为「展开」后完整展示长字符串。
  • 版本号 bump 至 v0.5.0

验证

  • pnpm build 通过,pnpm test 12/12 通过。
  • Chrome DevTools 实测:Markdown 各元素渲染正确、链接 href 正确;长文本省略/展开切换生效。

🤖 Generated with Claude Code

lRoccoon and others added 5 commits May 22, 2026 19:43
- ValuePopup: render long strings as Markdown by default, with a
  toggle to fall back to the plain <pre> view
- Add a dependency-free, sanitized Markdown renderer (markdown.tsx)
- JsonTree: add a toolbar toggle to show long strings in full
  instead of truncating them to a single ellipsized line
- Bump to v0.5.0

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
corepack now resolves pnpm 10, which blocks dependency build scripts
by default and exits non-zero on ERR_PNPM_IGNORED_BUILDS, breaking the
Docker image build. Whitelist esbuild via pnpm.onlyBuiltDependencies.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Newer pnpm no longer reads the "pnpm" field in package.json, so the
previous fix was ignored and the Docker build still failed on
ERR_PNPM_IGNORED_BUILDS. Move the esbuild allowlist to its new home,
pnpm-workspace.yaml.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The image build copied only package.json and the lockfile before
running pnpm install, so pnpm-workspace.yaml (which carries
onlyBuiltDependencies) was missing and esbuild builds stayed ignored.
Copy it alongside the manifest.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The Docker build ran corepack without a pinned pnpm version, so it
floated to whatever pnpm corepack resolved by default — a build whose
handling of onlyBuiltDependencies differed and kept failing on
ERR_PNPM_IGNORED_BUILDS. Pin pnpm@10.28.0, which is verified to honour
the esbuild allowlist on a clean store.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lRoccoon
lRoccoon merged commit 0f9b141 into main May 22, 2026
1 check passed
@lRoccoon
lRoccoon deleted the feat/markdown-preview-and-long-text branch May 22, 2026 11:57
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