Reintent

A decision nobody can overrule

Something that could be chosen, written as a fixed rule.

A value in Reintent carries who said it and what it depends on. This page is about losing the first: a rule in the host sets the value directly, and no layer of the choice can change it. A value that loses its reason is about losing the second.

The symptom: System One answered, Sam decided, and the card still shows a value set by a rule in the host.

You will learn

  • How to tell a choice from a rule
  • Six ways a choice ends up as a rule, and what to write instead
  • How to tell a constraint from a preference

Whose word is it

Ask of any value on the screen: who said it, and who can say otherwise? A value in a choice has an answer: the code's prior, System One's belief, what the host measured, Sam's decision, each in its layer (Who answers a choice). When a function in the host sets the final value directly, neither taking back a decision nor a new judgment changes it, and DevTools cannot show where it came from.

The host picks a possibility

A layout engine scores the possibilities for a screen and draws the best. Or it checks whether the default fits, and when it does, System One is not asked. The engine's score mixes what it measured (three photos do not fit in a row) with its preference (stack on a narrow screen). Its preference now sits above the model's judgment, and sets the value on most screens.

The host reports what it measured instead, and the choice's layers decide: intent.measure rules out what does not fit, weighs by score, and takes the engine's preference as prior, which a judgment replaces.

A preference passed off as a fact

"Does not fit" is defined by the engine's own parameters: text below half of its smallest size, or a column narrower than a width someone picked once. Such a line is a preference that acts as a measurement: it rules possibilities out above System One, and its threshold is so loose that it almost never applies, so everything counts as fitting.

Whether something fits is measured on the drawn result, in units that can be checked: the smallest text in pixels for each role, characters on a line, whether anything runs off the screen. The engine's preference goes in prior.

A hard-coded cap

The host rules that on any screen the page's scale is at most 1, never larger than on the main canvas. On a TV, Sam wants the whole page's text a little larger, and there is no way to ask for it.

The page's scale is a choice. The code gives its prior for each screen, and Sam's decision sits above the prior (What a person says).

Adaptation hidden inside a part

A component has breakpoints inside it: at 760 pixels wide it switches to another arrangement and another type size. To the intent it is one block whose inside it cannot see, scaled as a whole. No choice reads its arrangement, so judgments, measurements and decisions cannot affect it.

Write the groups and text inside the component into the intent as well, and declare its arrangement as a choice the host measures on each screen.

A second tree outside the program

The program describes the top-level blocks. How a group is laid out inside, the host decides with its own logic, and to make the panel say "automatic" it adds a made-up prior to the choice. What is drawn and the choice's value now disagree, and the choice System One judges no longer decides anything.

Express the structure inside the group in the program, and let the host report measurements of what it actually drew back into the choice. There is one tree, and what is drawn is the cascade's value.

A second path around the choice

Measuring sits behind a switch, and with it off the engine picks the old way. Some screens get their value from the cascade and some from the engine, and one choice has two explanations.

Keep only the path through the choice. When the measurement is not accurate enough yet, the measurement is what to improve.

Constraints and preferences

Not every rule in a host is a hidden choice. Text that runs off the screen does not fit; a picture the format cannot show cannot be shown. These are facts, and in the context where they hold they are constraints for the cascade. A person's decision still stands above a measurement: the host reports unfit, and the choice shows that state.

Recap

  • Ask of a value who said it and who can say otherwise.
  • The host measures and reports. A measured fact is a constraint; the engine's preference is a prior.
  • A part's arrangement, a range, a scale are choices in the program, not rules in a function.

Last updated on

Edit on GitHub