Skip to content

refactor(chat): share math label configuration - #148073

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/chat-math-label-config-rank134
Sep 14, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/chat-math-label-config-rank134

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Keep chat math-label configuration consistent across macOS and iOS without maintaining duplicate setup.

User Impact

No user-visible behavior change. Math styling, parsing, fallback behavior, accessibility, and platform-specific sizing remain unchanged.

Why This Change Was Made

Both platform update methods use the existing configuration routine through a shared private method and SwiftMath's platform color alias. Presentation updates still occur before the unchanged-LaTeX check; macOS fitting-size handling is untouched.

Evidence

  • Paired iOS 26.5 Simulator runs passed the same four tests on the original and formatted candidate, with zero failures or skips: stable-label font/color updates followed by changed valid LaTeX, existing display-math smoke, dynamic font scaling, and branded chat typography. Owned windows and the Simulator were cleaned up. Nonblocking hosting teardown warnings remain in the logs.
  • Reused hosted macOS baseline compiled the relevant original source and passed both standard/split math-layout cases at widths 960/620/960. The tested commit was bf650a8025ec18244a712077c599fd3773a5dbac, with matching relevant baseline inputs, not the task's base commit.
  • Hosted candidate macOS proof compiled the candidate owner and existing test file with SwiftMath 1.7.3 and passed both standard/split math-layout cases. Actual tested merge checkout 2595e8528c2cb62ea23483205d88aeec8f617902 contains PR head 70a46a366a700ad975b91eb44566e956ea5354e0; its owner and test blobs match the reviewed candidate. The executed test source exercises widths 960/620/960.
  • Targeted SwiftFormat and retained scoped SwiftLint/tooling checks passed. Fresh independent review found no actionable issues; the subsequent formatter-only access-placement adjustment is recorded separately.
  • Earlier dependency-layout, private-fixture compilation, and tool-invocation failures are retained. They were corrected before the successful paired runs; no required gate was disabled or bypassed.
  • Aggregate exact-head CI completed successfully for 70a46a366a700ad975b91eb44566e956ea5354e0. The earlier watcher timeout is retained as an observation failure, not a test failure. No local AppKit window execution, full iOS suite, live Gateway, or whole-current-main qualification is claimed.

@vincentkoc vincentkoc self-assigned this Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 14, 2026 07:54
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 4:12 AM ET / 08:12 UTC.

ClawSweeper review

What this changes

Share native chat’s math-label styling setup between macOS and iOS while preserving platform-specific sizing and LaTeX updates.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a focused, behavior-preserving cleanup that current main has not adopted. No actionable correctness or security defect was found, and the maintainer-authored PR is protected from automatic closure.

Priority: P3
Reviewed head: 70a46a366a700ad975b91eb44566e956ea5354e0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, maintainable refactor with verified platform-type equivalence and no identified defects.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored refactor is exempt from the external-contributor proof gate. Its captured body reports paired iOS Simulator configuration checks; the linked macOS result covers the baseline, while candidate macOS checks were still pending.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored refactor is exempt from the external-contributor proof gate. Its captured body reports paired iOS Simulator configuration checks; the linked macOS result covers the baseline, while candidate macOS checks were still pending.
Evidence reviewed 7 items Introduced change and merge ownership: The pinned introduced diff only shares existing configuration. Independently inspecting the test merge confirmed its parents are the pinned base followed by the exact PR head; its diff against that base contains the same focused change.
Preserved rendering behavior: Both native update methods call the shared private helper. Styling still updates before the unchanged-LaTeX guard; parsing eligibility, code fallback, accessibility, and macOS fittingSize handling remain unchanged.
Dependency contract applies: OpenClawChatUI directly imports SwiftMath and the patch uses its MTColor alias. Package.swift pins SwiftMath 1.7.3; Package.resolved identifies revision fa8244ed032f4a1ade4cb0571bf87d2f1a9fd2d7.
Findings None None.
Security None None.

How this fits together

OpenClaw’s native chat renderer sends completed math blocks, font size, and text color to SwiftMath labels. The platform adapters configure those labels for display in macOS and iOS conversations.

flowchart TD
  A[Chat Markdown] --> B{Complete valid math?}
  B -->|No| C[Code fallback]
  B -->|Yes| D[Native platform adapter]
  E[Font size and text color] --> D
  D --> F[Shared label configuration]
  F --> G[Rendered math in chat]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Other -5. Total -5 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 5 10 -5
Total 1 5 10 -5

Review metrics

None.

Technical review

Best possible solution:

Keep one private configuration helper for both native adapters while retaining their existing sizing and rendering contracts.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR proposes a refactor and reports no broken user behavior; source inspection supports equivalent configuration on both platforms.

Is this the best way to solve the issue?

Yes: the existing helper and SwiftMath’s verified platform color alias remove duplication without introducing another abstraction or changing update ordering.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 47060d1cef27.

Labels

Label changes:

  • add P3: This removes duplicated native presentation setup without adding capability or changing user-visible behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored refactor is exempt from the external-contributor proof gate. Its captured body reports paired iOS Simulator configuration checks; the linked macOS result covers the baseline, while candidate macOS checks were still pending.

Label justifications:

  • P3: This removes duplicated native presentation setup without adding capability or changing user-visible behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored refactor is exempt from the external-contributor proof gate. Its captured body reports paired iOS Simulator configuration checks; the linked macOS result covers the baseline, while candidate macOS checks were still pending.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc merged commit 9bfbb6d into main Sep 14, 2026
126 of 127 checks passed
@vincentkoc
vincentkoc deleted the refactor/chat-math-label-config-rank134 branch September 14, 2026 09:04
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 14, 2026
* commit 'a08cdc50bc049074ed7ad2db9e18e0ed3f5415ec': (81 commits)
  perf: reuse stateless plugin scope defaults (#148080)
  fix(gateway): flush slow-consumer 1008 close frame before terminating socket (#147707)
  fix: keep model catalogs loading during other session updates (#147878)
  fix: show queued external chat messages and their source (#147848)
  refactor(chat): share math label configuration (#148073)
  perf(ui): trim eager debug overlay icon payload (#147954)
  improve(logbook): sample batch frame metadata in SQLite (#147999)
  fix(ui): dismiss suggested task cards without waiting (#148021)
  fix(maturity): cover governance, interoperability, fleet, and state (#143528)
  chore(ui): restore core lint and startup budget checks (#148010)
  fix: chat startup loads unnecessary session setup text (#147973)
  perf: speed up fresh cloud worker activation (#147945)
  fix: recover PR preparation after committed merge conflicts (#148063)
  test(plugins): isolate ClawHub Docker fixture identity (#148074)
  fix(release): acknowledge ClawHub risk on moving installs (#148041)
  fix: restore context reads for installed official Discord and Slack plugins (#143341)
  fix: identify source capsule filesystem failures (#147778)
  fix(linux): keep Quick Chat widgets bound to their Gateway (#146049)
  refactor(infra): consolidate update campaign reset ownership (#146555)
  refactor: simplify Gateway health response parsing (#147834)
  ...
vincentkoc added a commit to nvtoroy/openclaw that referenced this pull request Sep 15, 2026
* commit '7d485aa2e89af7fdbd09e8ed0489b06d250b07e3':
  test(scripts): check the configurable ClawHub sweep spec
  fix: show queued external chat messages and their source (openclaw#147848)
  refactor(chat): share math label configuration (openclaw#148073)
  perf(ui): trim eager debug overlay icon payload (openclaw#147954)
  improve(logbook): sample batch frame metadata in SQLite (openclaw#147999)
  fix(ui): dismiss suggested task cards without waiting (openclaw#148021)
  fix(maturity): cover governance, interoperability, fleet, and state (openclaw#143528)
  chore(ui): restore core lint and startup budget checks (openclaw#148010)
  fix: chat startup loads unnecessary session setup text (openclaw#147973)
  perf: speed up fresh cloud worker activation (openclaw#147945)
  fix: recover PR preparation after committed merge conflicts (openclaw#148063)
  test(plugins): isolate ClawHub Docker fixture identity (openclaw#148074)
  fix(release): acknowledge ClawHub risk on moving installs (openclaw#148041)
  fix: restore context reads for installed official Discord and Slack plugins (openclaw#143341)
  fix: identify source capsule filesystem failures (openclaw#147778)
  fix(linux): keep Quick Chat widgets bound to their Gateway (openclaw#146049)
  refactor(infra): consolidate update campaign reset ownership (openclaw#146555)
  refactor: simplify Gateway health response parsing (openclaw#147834)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant