Skip to content

feat(ui): 落地页深色工程风重设计 + 工作台宽屏布局与预览修复 - #223

Merged
Vantalens merged 3 commits into
mainfrom
fix/landing-workbench-visual-polish
Sep 24, 2026
Merged

Vantalens merged 3 commits into
mainfrom
fix/landing-workbench-visual-polish

Conversation

@Vantalens

Copy link
Copy Markdown
Owner

概述

在 #221(已合并)的基础上,对落地页做整体重设计(深色工程控制台风格),并修复工作台在宽屏下的一批布局 bug 与体验问题。纯展示层 + UI 行为修复,不涉及转换核心逻辑。

落地页重设计(landing-view.js / styles/landing.css)

  • 深墨蓝底(#0b0e13)+ 发丝线网格,技术图纸质感;等宽字体大写标签体系
  • Hero:meta 行(V2.4.0 · LOCAL-FIRST · 14 IN × 11 OUT)+ 青→蓝渐变标题 + pill 按钮组
  • 特性区:Repair Engine 宽卡内置文档扫描光束动画(inline SVG 文档图标 marquee + 青蓝光束;默认暂停,hover/focus/进入视口播放;prefers-reduced-motion 下完全静止)
  • 格式矩阵改为技术数据行(发丝线分隔 + 描边徽章);工作流为 01–05 编号轨道;新增发丝线页脚
  • 滚动渐入保持 .reveal-armed 门控;打印强制可见且无过渡

工作台修复(styles.css / app.js)

  • 宽屏布局:顶栏内容限宽 1760px 居中(≥1808px 生效);进度轨道封顶 320px;工作区限宽 1920px 居中
  • 编辑器高度:输入编辑器从固定 144–420px 改为 flex 铺满面板,消除宽屏下大片死白
  • 状态芯片:长文案(如"已恢复本地工作区:<长文件名>")截断省略号,悬停 title 显示全文
  • 陈旧预览修复:载入新文件 / 恢复工作区后,右侧预览不再残留示例文档,显示与输入一致的空态
  • 扫描件指引:模型携带 PDF_NO_TEXT_RUNS(pdf 分支提供,缺它时优雅降级)时,输入区与预览明确提示"N 页无文本层,疑似扫描件,转换将使用本地 OCR"
  • 字体:UI 统一 Inter/Segoe/PingFang 系统栈;等宽栈只用于代码与数字;清除中文伪斜体;预览正文行高 1.72

测试

  • ✅ design-token-test / ui-accessibility-test / ui-button-consistency-test(12/12)/ unified-button-test
  • ✅ smoke-test(60 组)/ browser-smoke-test / ui-conversion-e2e-test / server-hardening-test
  • 2559×1332 宽屏、1440×900、390×844 移动端截图核验;另用真实扫描件 PDF(2 页无文本层)端到端验证:指引正确显示,转换走本地 OCR 出文字

…view gradient buttons

Landing:
- bump hero eyebrow v2.3 -> v2.4 to match package version
- tighten hero vertical rhythm; split subtitle into nowrap phrases to
  drop the single-character orphan line
- gate .reveal-on-scroll behind a .reveal-armed class so content stays
  visible when JS/observer/print contexts never trigger intersection
- hover feedback for feature cards, format rows, workflow steps; CTA
  section gets a brand gradient bar

Workbench (styles.css only):
- dashed centered empty states, tab active indicator, focus-visible rings
- gradient progress bar with tabular-nums percentage
- stronger pane elevation, press feedback on ghost/mini/menu buttons

Preview (preview.css):
- explicit brand-gradient primary button rules for dark topbar context
  (fixes unified-button-test baseline failure: token now used 3x)

Chore: add npm run dev script alongside existing start script

Tests: design-token, ui-accessibility, ui-button-consistency (12/12),
unified-button, smoke (60 groups), browser-smoke, ui-conversion-e2e,
server-hardening all pass.
…screen fixes

Landing (landing-view.js / styles/landing.css):
- full redesign: deep ink-navy (#0b0e13) palette, hairline grid lines,
  monospace uppercase labels, pill CTAs
- hero: meta row (V2.4.0 / LOCAL-FIRST / 14 IN x 11 OUT), two-line
  headline with teal-to-blue gradient accent, nowrap phrase subtitle
- feature grid with Repair Engine wide card housing an animated
  document-scan beam (marquee of inline-SVG document icons + teal/blue
  light beam; paused by default, plays on hover/focus/in-viewport,
  fully static under prefers-reduced-motion)
- format matrix reworked into technical data rows with hairline
  dividers and outlined route-class chips; workflow as 01-05 numbered
  track; hairline footer
- reveal-on-scroll stays gated behind .reveal-armed; print forces
  visible without transitions

Workbench (styles.css / app.js):
- topbar: content capped at 1760px and centered on >=1808px screens;
  progress track max-width 320px; landing-state topbar goes dark with
  pill nav button pinned right
- status chip: max-width + ellipsis truncation, full text via title
- workspace capped at 1920px centered; input editor now flex-fills the
  source pane (was pinned to 144-420px leaving dead space)
- stale preview fix: loading a file / restoring workspace no longer
  leaves the sample document in the preview pane; empty states explain
  the actual input state
- scanned-PDF guidance: when the model carries PDF_NO_TEXT_RUNS (from
  the pdf branch; degrades gracefully without it), input pane and
  preview show "N pages without text layer, likely scanned - conversion
  will use local OCR"
- typography: Inter/Segoe/PingFang system stack for UI, unified mono
  stack for code/figures, no pseudo-italic Chinese, preview body
  line-height 1.72

Tests: design-token, ui-accessibility, ui-button-consistency,
unified-button, smoke (60 groups), browser-smoke, ui-conversion-e2e,
server-hardening all pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2821e4ebb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread public/app.js
Comment on lines +1444 to +1445
function isNoTextRunsPdfModel(model) {
return Boolean(getPdfNoTextRunsWarning(model)) || model?.metadata?.pdf?.extraction === "pdfjs-no-text";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match the no-text metadata emitted by the PDF reader

For scanned PDFs processed by the current PDF.js path, readPdf emits PDF_NO_CREDIBLE_TEXT with metadata.pdf.extraction === "pdfjs-text-content"; neither PDF_NO_TEXT_RUNS nor "pdfjs-no-text" is produced anywhere in the repository. Consequently this predicate is always false for the intended input, so both newly added scanned-document guidance branches fall back to the generic “未能提取” message. Check the metadata the reader actually emits, such as an unavailable textStatus with a non-encrypted PDF.js payload, or add the claimed producer metadata.

Useful? React with 👍 / 👎.

Comment thread public/app.js
Comment on lines +1072 to +1074
inputContent.style.minHeight = `${minHeight}px`;
inputContent.style.height = "";
inputContent.style.overflowY = "auto";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve content-based sizing in the stacked layout

At viewport widths of 1180px or less, styles.css switches .workspace to auto-sized rows and gives .source-pane no definite height. In that layout the textarea has no flex free space to fill, so clearing its explicit height leaves every text document at the 144px minimum with an internal scrollbar; previously it grew with scrollHeight up to 420px. Keep content-based sizing for the stacked breakpoint, or give the pane a definite height before relying on flex growth.

Useful? React with 👍 / 👎.

Resolve conflicts from squash-merged #221 (identical content to this
branch's first commit) and #224 (pdf.js scanned-PDF warning): take the
redesigned UI files; pdf.js and docs come from main unchanged.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7cab8e331b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread public/app.js
if (String(fromFormatSelect.value).toLowerCase() === "pdf") {
// 扫描件/图片型 PDF:占位文案明确引导本地 OCR(与加密提示并列的专门分支)
try {
const inputModel = toDocumentModel(currentInputContent, fromFormatSelect.value, fileName);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reuse the PDF model instead of parsing it again

On every PDF load, createReadableInputDisplay(...) immediately above already calls toDocumentModel for binary inputs, so this added call synchronously rebuilds the same model a second time; the queued preview then builds it a third time. For large PDF data URLs, each pass rescans the full payload and reconstructs its blocks on the main thread, adding avoidable UI stalls. Return/reuse the model from the first parse when deriving the scanned-document message.

Useful? React with 👍 / 👎.

Comment thread public/styles/landing.css
Comment on lines +212 to +216
.landing-view .primary-button.btn-gradient.btn-lg {
border-radius: var(--radius-full);
padding-left: calc(var(--space-6) + var(--space-1));
padding-right: calc(var(--space-6) + var(--space-1));
box-shadow: 0 0 0 1px rgba(75, 243, 200, 0.18), 0 8px 28px -12px rgba(13, 148, 136, 0.55);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add a high-contrast focus indicator for dark landing CTAs

When navigating the redesigned landing page by keyboard, these primary CTAs retain the global focus outline rgba(13, 148, 136, 0.18), which has very low contrast against the new #0b0e13 background and is further indistinguishable from the button's always-present teal shadow. Unlike the ghost CTA, this block provides no dark-theme :focus-visible override, so keyboard users can lose track of focus; add a clearly contrasting landing-specific focus ring.

Useful? React with 👍 / 👎.

@Vantalens
Vantalens merged commit 01ea2ca into main Sep 24, 2026
8 checks passed
@Vantalens
Vantalens deleted the fix/landing-workbench-visual-polish branch September 24, 2026 10:17
Vantalens added a commit that referenced this pull request Oct 22, 2026
# Conflicts:
#	public/app.js
#	public/landing-view.js
#	public/styles.css
#	public/styles/landing.css
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