Repository navigation
spec: Phase 30 — the mobile surface - #233
Merged
Merged
Conversation
2 tasks
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Planning artifact for Phase 30 (v2.4), the mobile surface. No code: docs/specs/PHASE-30-SPEC.md plus the VISION entry.
The thesis: framesmith treats mobile as a screen size, not a surface. The mobile attempt built one iOS screen on v2.2.0 and got 100/100 and READY TO PRESENT without a single mobile check running, because the touch-target rule only looks at form controls and the screen had none. This phase gives a canvas a declared
type(webormobile) and builds what a surface needs: rules that judge a phone, the vocabulary to build one, and starting points.Slices
A. Untangle the declarations. Genre and preset share one field today, so
apply_presetsilently overwrites a genre. Genre gets its own field, stored canvases keep their score through a legacy read, anddatabecomes the canonical purpose genre withdashboardas its alias.B. The type axis.
canvas_create({ type: "mobile" })gives a 390×844 artboard whose root reserves the safe-area insets. A newcanvas_set_typetool declares the type on an existing canvas. A ruleset table keyed by type, genre and preset composes by union and can turn rules on, not only relax cliché tells. Every evaluation reports which rules ran.C. The mobile ruleset. Tap targets below 44px are an error on every tappable primitive. Content may not sit in the safe areas or under a pinned bar. There is a type floor. A phone-width canvas that never declared a type must declare one. Stress learns the new primitives.
D. Vocabulary.
fixedandstickypositioning, plus seven primitives:status-bar,home-indicator,nav-bar,tab-bar,button,list-row,sheet.E. Starting points. A structure now separates the screen kind (anatomy) from its per-type layout (realisation). Six mobile realisations ship, named
<anatomy>-mobile, and the pattern gate covers them.F. The viewer. Thumbnails at the artboard's real proportions, and a device frame with a safe-area overlay.
G. Acceptance. The attempt screen is rebuilt from a mobile starting point and must reach CLEAN with every tap target a primitive, in fewer nodes than the 93 it took by hand.
Decisions I'd like your eyes on
Each is decided with a recommendation in the spec's Clarify section, and each could go the other way:
safeArea, and button heights are 32 / 44 / 52 on every type. The cost is thatsize: "sm"fails the 44px rule on a phone by design. The alternative, sizes that depend on the type, would let a screenshot change withoutversionHashmoving, which breaks what a CI verify means.width: 390and no type. A responsive web page designed at 390 pays onecanvas_set_type("web")call.materialstays both a preset and a genre (C3). Its relaxation is keyed to the preset. It stays accepted as a genre because theinitgotchas recommendgenre: "material"for editors and admin forms today, and dropping it would change those agents' verdicts.genrenow keeps the stamped preset's relaxation. Today an explicitgenre: "commerce"on a material-preset canvas drops the material relaxation. After this phase it keeps it, because the material style is still on the canvas. This is a deliberate behaviour change, described in FR-A2.The main risks, plainly
webon a phone app screen to avoid the mobile errors. The spec closes the silent path and makes the declaration visible in every result and in the viewer, but it does not prevent the dodge. Preventing it would need width-based inference, which would make a responsive web page designed at 390 impossible to express.canvas_set_genrenow reads as a preset, so the genre report'sactivevalue goes to null.How the spec was checked
Before freezing, one verifier tried to make each pass/fail rule give a wrong verdict. It found 22 problems, and about ten of them were real wrong verdicts. The spec was revised around them, including the render rule in decision 1. After freezing, three more checks ran. A citation check confirmed 54 of 60 code references and the remaining six were corrected. A conformance check covered the agreed surface model and the gap catalog. A reader given only the spec confirmed it is buildable from the document alone. Three narrower rounds then verified the fixes. The last four edits, in commit c5abe13, were reviewed only by the author.