Skip to content

feat(core): inline iOS frame starter template#82

Merged
hqhq1025 merged 1 commit intomainfrom
wt/loop-feat-ios-starter-template
Apr 19, 2026
Merged

feat(core): inline iOS frame starter template#82
hqhq1025 merged 1 commit intomainfrom
wt/loop-feat-ios-starter-template

Conversation

@hqhq1025
Copy link
Copy Markdown
Collaborator

让模型 import 一个手工 polish 过的 iPhone 14 Pro frame skeleton,避免每次重画 status bar / dynamic island。模型只管 .ios-screen 内的 app UI 设计。

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Findings

  • [Major] 新增 iOS skeleton 与现有全局输出规则冲突,容易把模型引导到非 token 化样式,导致输出不稳定且违反既有约束。证据:packages/core/src/prompts/index.ts:540(要求“exact skeleton”)、packages/core/src/prompts/index.ts:550(硬编码颜色/字体)、packages/core/src/prompts/index.ts:570(硬编码 #ffffff)、packages/core/src/prompts/index.ts:582(硬编码 #000)。
    Suggested fix:

    // keep geometry fixed, but move visual values to :root tokens
    :root {
      --ios-bg: #f5f5f7;
      --ios-fg: #000;
      --ios-screen-bg: #fff;
      --ios-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', sans-serif;
    }
    body { background: var(--ios-bg); font-family: var(--ios-font); }
    .ios-status-bar { color: var(--ios-fg); }
    .ios-dynamic-island { background: var(--ios-fg); }
    .ios-screen { background: var(--ios-screen-bg); }
    .ios-home-indicator::after { background: var(--ios-fg); }
  • [Minor] html lang 被固定为 zh,会让英文/其他语言请求默认产出错误语言标记,影响可访问性与语义正确性。证据:packages/core/src/prompts/index.ts:544
    Suggested fix:

    <html lang="en">
    // Or add instruction in the template:
    // Set <html lang="..."> to match the user's language.
    

Summary

  • Review mode: initial
  • 发现 2 个问题(1 Major, 1 Minor)。
  • 约束核查补充:本次 diff 未引入新依赖,未发现 direct provider SDK import,未见静默 fallback 逻辑变更;docs/VISION.mddocs/PRINCIPLES.md 在当前仓库中 Not found in repo/docs,相关规范仅能基于 CLAUDE.md 与现有 prompt 规则交叉检查。

Testing

  • Not run (automation)

open-codesign Bot

<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f5f5f7; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', sans-serif; -webkit-font-smoothing: antialiased; }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Major] 这里开始的 iOS skeleton 使用了多处硬编码视觉值(颜色/字体),且上文要求 "exact skeleton",与同一 system prompt 里要求 token 化/变量化的输出规则形成冲突。建议保持几何尺寸不变,但将视觉值改为 :root 变量并在 skeleton 中引用。


\`\`\`html
<!doctype html>
<html lang="zh">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Minor] <html lang="zh"> 会把非中文请求也固定为中文语言标记。建议改为 lang="en" 作为中性默认,或在模板中明确要求按用户输入语言设置 lang

@hqhq1025 hqhq1025 merged commit ba67691 into main Apr 19, 2026
5 of 6 checks passed
@hqhq1025 hqhq1025 deleted the wt/loop-feat-ios-starter-template branch April 19, 2026 05:14
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