Skip to content

feat: web design-contract alignment, changed-line estimates, and architecture policy gate - #347

Merged
elkaix merged 11 commits into
mainfrom
feat/design-system-and-agent-tooling
Oct 1, 2026
Merged

elkaix merged 11 commits into
mainfrom
feat/design-system-and-agent-tooling

Conversation

@elkaix

@elkaix elkaix commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Requirement or Bug

Complete the web design-token rollout described in the design-system guide, make changed-line counts honest for large edits, and land the bounded-context architecture gate with its agent tooling. Closes #341 and its tickets #342–#346.

Code Changes

  • Terminal palette from design tokens — the embedded terminal reads its xterm theme from new --terminal-* custom properties (12 roles across light, dark, and system-dark scopes) instead of two hardcoded hex palettes; theme switches now propagate through one source of truth.
  • Workflow panel motion — feature-scoped --color-workflow-* rail tokens plus the shared --wf-* motion scale; card/state transitions, a running-indicator pulse at the panel beat, label tracking, and automatic disable under reduced motion.
  • Typography and shape contract on application surfaces — remaining raw font-size declarations moved onto the --text-* scale (14 sites across workflow cards, dialogs, badges, keyboard hints, composer, first-run, recovery); attachment count pill resized to host scaled text; radius/shape/overlay drift fixed onto contract tokens; all verified in light, dark, system-dark, and mono accent.
  • Honest changed-line counts — computeLineChangeStat (common prefix/suffix trim, row-array LCS, conservative fallback past a cell budget) with computeEditChangeStat; edit cards and file summaries now show ~-marked estimates when a full diff is too expensive instead of +0/-0; only Write stays genuinely unknown. 13-case test coverage including trim, fallback, and large-file exactness.
  • Bounded-context policy gate — architecture-policy.yaml plus scripts/architecture/ (package boundary rules, file-name conventions, golden-module contract, baseline) wired as pnpm architecture:check, with the yaml root dependency declared and the governance skill (rule catalog, policy schema, troubleshooting).
  • Agent tooling skills — browser automation, dogfooding, Electron automation, and framework-neutral TypeScript performance rules (24 js/async/bundle rules) added to the skill catalog; design-system guide retokenized to this repo's CSS vocabulary.
  • Generated web bundle restaged; flake.nix pnpmDeps hash refreshed for the new dependency.

Behavior Changes and Affected Users

  • Web users: terminal follows the app theme everywhere; workflow panel animates (disabled under reduced motion); UI text scales with the user font size on previously fixed surfaces; large edits no longer read as "no change" in transcripts and file summaries; minor visual alignment on shapes.
  • Developers: new pnpm architecture:check gate and governance skill; four new agent skills; one new root dev dependency (yaml).

Checklist

  • Changesets for user-visible behavior (web-design-token-alignment, web-large-edit-diff-stats, web-surface-contract-alignment — minor)
  • Tests: diff-stat suite (13 cases), web lib suites 204/204, full matrix green (build, typecheck, lint, sherif, pnpm test — 17931 passed; the single failure is the documented environment-specific base case), web typecheck + build, architecture:check clean
  • flake.nix workspace sync and pnpmDeps hash verified
  • English-only; no tracking or third-party identifiers introduced

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 117 files, which is 17 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Repository: PyModel/pythinker-code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4ababef4-9687-4208-b2f7-502aafaa4e26

📥 Commits

Reviewing files that changed from the base of the PR and between 349be12 and 3bc68e3.

⛔ Files ignored due to path filters (4)
  • apps/pythinker-code/dist-web/assets/index-2zSxMdPb.js is excluded by !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].js
  • apps/pythinker-code/dist-web/assets/index-DhJ-PkiM.css is excluded by !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].css
  • apps/pythinker-code/dist-web/assets/index-l1Ge5LFc.css is excluded by !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].css
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/pnpm-lock.yaml
📒 Files selected for processing (117)
  • .agents/skills/agent-browser/SKILL.md
  • .agents/skills/agent-browser/references/authentication.md
  • .agents/skills/agent-browser/references/commands.md
  • .agents/skills/agent-browser/references/profiling.md
  • .agents/skills/agent-browser/references/proxy-support.md
  • .agents/skills/agent-browser/references/session-management.md
  • .agents/skills/agent-browser/references/snapshot-refs.md
  • .agents/skills/agent-browser/references/video-recording.md
  • .agents/skills/agent-browser/templates/authenticated-session.sh
  • .agents/skills/agent-browser/templates/capture-workflow.sh
  • .agents/skills/agent-browser/templates/form-automation.sh
  • .agents/skills/architecture-governance/references/golden-module/CONTRACT.md
  • .agents/skills/architecture-governance/references/golden-module/contract.example.ts
  • .agents/skills/architecture-governance/references/golden-module/contract.ts
  • .agents/skills/architecture-governance/references/golden-module/module.ts
  • .agents/skills/architecture-governance/references/module-contract.md
  • .agents/skills/architecture-governance/references/policy-schema.md
  • .agents/skills/architecture-governance/references/rule-catalog.md
  • .agents/skills/architecture-governance/references/troubleshooting.md
  • .agents/skills/dogfood/SKILL.md
  • .agents/skills/dogfood/references/issue-taxonomy.md
  • .agents/skills/dogfood/templates/dogfood-report-template.md
  • .agents/skills/electron/SKILL.md
  • .agents/skills/ts-performance-rules/SKILL.md
  • .agents/skills/ts-performance-rules/rules/async-cheap-condition-before-await.md
  • .agents/skills/ts-performance-rules/rules/async-defer-await.md
  • .agents/skills/ts-performance-rules/rules/async-dependencies.md
  • .agents/skills/ts-performance-rules/rules/async-parallel.md
  • .agents/skills/ts-performance-rules/rules/bundle-analyzable-paths.md
  • .agents/skills/ts-performance-rules/rules/bundle-barrel-imports.md
  • .agents/skills/ts-performance-rules/rules/bundle-conditional.md
  • .agents/skills/ts-performance-rules/rules/bundle-defer-third-party.md
  • .agents/skills/ts-performance-rules/rules/bundle-dynamic-imports.md
  • .agents/skills/ts-performance-rules/rules/bundle-preload.md
  • .agents/skills/ts-performance-rules/rules/js-batch-dom-css.md
  • .agents/skills/ts-performance-rules/rules/js-cache-function-results.md
  • .agents/skills/ts-performance-rules/rules/js-cache-property-access.md
  • .agents/skills/ts-performance-rules/rules/js-cache-storage.md
  • .agents/skills/ts-performance-rules/rules/js-combine-iterations.md
  • .agents/skills/ts-performance-rules/rules/js-early-exit.md
  • .agents/skills/ts-performance-rules/rules/js-flatmap-filter.md
  • .agents/skills/ts-performance-rules/rules/js-hoist-regexp.md
  • .agents/skills/ts-performance-rules/rules/js-index-maps.md
  • .agents/skills/ts-performance-rules/rules/js-length-check-first.md
  • .agents/skills/ts-performance-rules/rules/js-min-max-loop.md
  • .agents/skills/ts-performance-rules/rules/js-request-idle-callback.md
  • .agents/skills/ts-performance-rules/rules/js-set-map-lookups.md
  • .agents/skills/ts-performance-rules/rules/js-tosorted-immutable.md
  • .changeset/web-design-token-alignment.md
  • .changeset/web-large-edit-diff-stats.md
  • .changeset/web-surface-contract-alignment.md
  • CLAUDE.md
  • apps/pythinker-code/dist-web/.web-bundle-manifest.json
  • apps/pythinker-code/dist-web/assets/CodeBlockNode-Dl1x84a-.js
  • apps/pythinker-code/dist-web/assets/DesignSystemView-wQIG8pdq.js
  • apps/pythinker-code/dist-web/assets/Tooltip-BTEezncw.js
  • apps/pythinker-code/dist-web/assets/index10-DTgTZuhL.js
  • apps/pythinker-code/dist-web/assets/index11-ERJjbBp8.js
  • apps/pythinker-code/dist-web/assets/index3-CeHHGRW3.js
  • apps/pythinker-code/dist-web/assets/index3-_hquim6-.js
  • apps/pythinker-code/dist-web/assets/index4-CG0YzEMP.js
  • apps/pythinker-code/dist-web/assets/index4-Gxd-bmd4.js
  • apps/pythinker-code/dist-web/assets/index5-DvRmF6YX.js
  • apps/pythinker-code/dist-web/assets/index6-DAHS9kLT.js
  • apps/pythinker-code/dist-web/assets/index7-Dix_Wqfv.js
  • apps/pythinker-code/dist-web/assets/index8-BRlIM-qm.js
  • apps/pythinker-code/dist-web/assets/index9-BuL_us6D.js
  • apps/pythinker-code/dist-web/index.html
  • apps/pythinker-web/DESIGN.md
  • apps/pythinker-web/src/components/CapabilityMenu.vue
  • apps/pythinker-web/src/components/DynamicWorkflowPanel.vue
  • apps/pythinker-web/src/components/FilePreview.vue
  • apps/pythinker-web/src/components/ServerAuthDialog.vue
  • apps/pythinker-web/src/components/Terminal.vue
  • apps/pythinker-web/src/components/WindowControls.vue
  • apps/pythinker-web/src/components/chat/AttachmentChip.vue
  • apps/pythinker-web/src/components/chat/ChatDock.vue
  • apps/pythinker-web/src/components/chat/ChatHeader.vue
  • apps/pythinker-web/src/components/chat/ChatPane.vue
  • apps/pythinker-web/src/components/chat/Composer.vue
  • apps/pythinker-web/src/components/chat/ConversationPane.vue
  • apps/pythinker-web/src/components/chat/DiffView.vue
  • apps/pythinker-web/src/components/chat/OpenInMenu.vue
  • apps/pythinker-web/src/components/chat/TranscriptSearch.vue
  • apps/pythinker-web/src/components/chat/TurnFilesSummary.vue
  • apps/pythinker-web/src/components/chat/tool-calls/EditTool.vue
  • apps/pythinker-web/src/components/dialogs/AddWorkspaceDialog.vue
  • apps/pythinker-web/src/components/panel/PanelTabBar.vue
  • apps/pythinker-web/src/components/settings/FirstRun.vue
  • apps/pythinker-web/src/components/settings/Onboarding.vue
  • apps/pythinker-web/src/components/settings/Recovery.vue
  • apps/pythinker-web/src/components/settings/SecondaryModelPicker.vue
  • apps/pythinker-web/src/components/ui/AgentThinking.vue
  • apps/pythinker-web/src/components/ui/Badge.vue
  • apps/pythinker-web/src/components/ui/Button.vue
  • apps/pythinker-web/src/components/ui/Chip.vue
  • apps/pythinker-web/src/components/ui/Dialog.vue
  • apps/pythinker-web/src/components/ui/Kbd.vue
  • apps/pythinker-web/src/components/ui/MenuRow.vue
  • apps/pythinker-web/src/components/ui/MultiSelectMenu.vue
  • apps/pythinker-web/src/components/ui/Popover.vue
  • apps/pythinker-web/src/components/ui/SwitchToggle.vue
  • apps/pythinker-web/src/lib/diffLines.test.ts
  • apps/pythinker-web/src/lib/diffLines.ts
  • apps/pythinker-web/src/lib/toolDiff.ts
  • apps/pythinker-web/src/lib/turnFiles.test.ts
  • apps/pythinker-web/src/lib/turnFiles.ts
  • apps/pythinker-web/src/style.css
  • architecture-policy.yaml
  • flake.nix
  • package.json
  • scripts/architecture/architecture-check.mjs
  • scripts/architecture/git-file-names.mjs
  • scripts/architecture/index.mjs
  • scripts/architecture/policy.mjs
  • scripts/security/check-built-browser.mjs
  • scripts/security/check-built-browser.test.mjs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@3bc68e3
npx https://pkg.pr.new/@pymodel/pythinker-code@3bc68e3

commit: 3bc68e3

@elkaix
elkaix enabled auto-merge (squash) October 1, 2026 20:46
A slow Chrome start on the CI runner timed out after 15s, but the spawned
process stayed alive and held the stderr pipe open, so the Artifact security
job hung until the 45-minute job timeout. Kill Chrome on the launch timeout
and allow 60s for a slow runner.
@elkaix
elkaix merged commit bca1910 into main Oct 1, 2026
25 checks passed
@elkaix
elkaix deleted the feat/design-system-and-agent-tooling branch October 1, 2026 21:11
elkaix pushed a commit that referenced this pull request Oct 1, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @pymodel/pythinker-code@2.4.1

### Patch Changes

- [#352](#352)
[`772e69a`](772e69a)
Thanks [@elkaix](https://github.com/elkaix)! - Run tool calls that some
models (such as DeepSeek) write as DSML or <tool_call> text instead of
showing them as plain text.

- [#352](#352)
[`772e69a`](772e69a)
Thanks [@elkaix](https://github.com/elkaix)! - Report an
insufficient-balance response from OpenAI-compatible providers as a
billing error instead of an authentication error.

- [#349](#349)
[`69cc714`](69cc714)
Thanks [@elkaix](https://github.com/elkaix)! - Fix OpenCode Go requests
failing with "Request is missing x-opencode-session".

- [#352](#352)
[`772e69a`](772e69a)
Thanks [@elkaix](https://github.com/elkaix)! - Accept a vendor API key
or base URL set in a provider's env table (for example ANTHROPIC_API_KEY
or ANTHROPIC_BASE_URL) instead of ignoring it.
## @pymodel/pythinker-web@0.2.0

### Minor Changes

- [#347](#347)
[`bca1910`](bca1910)
Thanks [@elkaix](https://github.com/elkaix)! - Align the embedded
terminal palette and workflow panel motion with the shared design token
system.

- [#347](#347)
[`bca1910`](bca1910)
Thanks [@elkaix](https://github.com/elkaix)! - Show estimated
changed-line counts for large edits in session transcripts and file
summaries instead of zero.

- [#347](#347)
[`bca1910`](bca1910)
Thanks [@elkaix](https://github.com/elkaix)! - Use the shared type scale
and corner radii on application surfaces.
## @pymodel/pythinker-desktop@1.5.1

### Patch Changes

- [#352](#352)
[`772e69a`](772e69a)
Thanks [@elkaix](https://github.com/elkaix)! - Run tool calls that some
models (such as DeepSeek) write as DSML or <tool_call> text instead of
showing them as plain text.

- [#352](#352)
[`772e69a`](772e69a)
Thanks [@elkaix](https://github.com/elkaix)! - Report an
insufficient-balance response from OpenAI-compatible providers as a
billing error instead of an authentication error.

- [#349](#349)
[`69cc714`](69cc714)
Thanks [@elkaix](https://github.com/elkaix)! - Fix OpenCode Go requests
failing with "Request is missing x-opencode-session".

- [#352](#352)
[`772e69a`](772e69a)
Thanks [@elkaix](https://github.com/elkaix)! - Accept a vendor API key
or base URL set in a provider's env table (for example ANTHROPIC_API_KEY
or ANTHROPIC_BASE_URL) instead of ignoring it.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Spec: design-token completion, change-count estimates, and shared-logic hardening (web + agent)

1 participant