Skip to content

Add a gea.designWidth manifest field - #3

Open
skyturkish wants to merge 1 commit into
mainfrom
weather-app
Open

skyturkish wants to merge 1 commit into
mainfrom
weather-app

Conversation

@skyturkish

@skyturkish skyturkish commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a gea.designWidth manifest field: the logical CSS width an app's stylesheets were authored for. Shells that render at an arbitrary size (phones, resizable desktop windows) divide their real width by it to get the device pixel ratio, so a layout drawn for a small panel scales to fill the surface instead of being magnified or left in a corner. weather declares 273.

Related PRs (merge core first):

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • App design-width settings now accept either a positive number or a numeric string. When no value is provided, the setting defaults to 0.
  • Bug Fixes
    • Invalid design-width values are now reported during app validation, helping surface configuration issues earlier.
    • App summaries now include the normalized design-width value for clearer visibility into the configured setting.

An app whose stylesheets are written in fixed px was laid out against one
particular width -- the panel it was drawn for. Targets that render at an
arbitrary size (a phone screen, a resizable desktop window) have had no way to
learn that width, so they either pinned the app to a build-time ratio or
followed the display density, and a layout drawn for a small panel ended up
either magnified or stranded in a corner.

designWidth records the logical CSS width the app was authored against. A shell
divides its real surface width by it to get the device pixel ratio, and since
the engine multiplies every CSS px by that ratio (ui::cssPixelLength), the
design scales to whatever it lands on with no second set of stylesheets.

This is deliberately not cssDevicePixelRatio: that one is a FIXED ratio a board
declares about itself, while this is a property of the app, and the ratio it
implies is different on every screen. Absent, each target keeps its own default,
so an app that declares nothing builds exactly as before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thanks for the pull request. Before it can be merged, please read the GeaStack Contributor License Agreement and sign it by posting a comment here with exactly:


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 8457bb0f-538a-468a-882d-9b2d11c29260

📥 Commits

Reviewing files that changed from the base of the PR and between 6a37018 and 2b3a6cb.

📒 Files selected for processing (1)
  • src/manifest.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The manifest now normalizes gea.designWidth, validates the normalized value, and includes it in the app summary.

Changes

Design width handling

Layer / File(s) Summary
Normalize and report design width
src/manifest.mjs
normalizeDesignWidth converts absent values to 0, positive finite numbers and numeric strings to numbers, and other values to NaN. normalizeApp stores the normalized value. validateApp reports NaN, and appSummary includes the value.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: dashersw

Merge Risk: ⚪ Minimal · up to 2b3a6

The manifest now accepts and reports the design-width field, with no repository-local behavior regression established; the change appears mergeable under normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 2b3a6

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/manifest.mjs: validateApp now adds an error when app.designWidth is NaN.
  • observed — Modified behavior in src/manifest.mjs: appSummary now includes the app’s normalized designWidth.
  • observed — Modified behavior in src/manifest.mjs: Added exported normalizeDesignWidth: absent values normalize to 0, positive finite numbers and numeric strings to numbers, and other values to NaN.
  • observed — Modified behavior in src/manifest.mjs: normalizeApp now sets designWidth from gea.designWidth using normalizeDesignWidth.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the gea.designWidth manifest field.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

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