Skip to content

view: dimension names and units are guessed (a Torque shows in J) #2070

Closed

Description

@shunichironomura

Warning

This content was written by an AI agent and must be verified by a human developer. After human verification, this alert may be removed.

Found in the review of #2057, which adds the experimental view. It does not block that PR; #2059 fixed the findings that did. Paths refer to #2059's head.

Problem

The view model guesses a dimension name and a coherent unit for a value (CoherentUnits in crates/graphcal-project/src/view_model/value.rs). It disagrees with graphcal eval and with the declared type.

dim Torque = Force * Length;
node t: Torque = 2.0 N * 1.5 m;
node r: Dimensionless / Time = 2.0 / 1.0 s;
Declaration graphcal eval graphcal view
t: Torque 3 m^2*kg/s^2 dimension Energy, value 3 J
r: Dimensionless / Time 2 s^-1 dimension Frequency, value 2 Hz

The numbers are right in the units shown. But showing a torque in joules goes against engineering practice, and the two commands disagree.

Proposed fix

Needs a decision on how the view shows units. The review recommends:

  • dimension carries the declaration's own spelling (Torque, Dimensionless / Time).
  • Without a display unit, a value is shown by the same rule as graphcal eval.

Activity

  1. added
    bugSomething isn't working
    webviewThe experimental view (web/view, graphcal view, graphcal/viewModel)
    on Oct 14, 2026
  2. added a commit that references this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdesignrustwebviewThe experimental view (web/view, graphcal view, graphcal/viewModel)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions