Skip to content

view: deduplicate logic in web/view #2081

Open

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. Paths refer to #2059's head.

Summary

Logic written more than once in web/view/src/. Only copies that do the same job are listed:

  • viewOf and evaluateView in engine.ts; merging them is part of view: a library with a required param can be opened but not edited #2065.
  • Guessing a file name from a module id, in render.ts and main.ts.
  • Joining paths under the project root: three places in githubHost.ts, and repoProject.join.
  • GitHubHost.readBase and GitHubHost.load.
  • Small helpers: el(), errorMessage, SVG_NS, wire end points, lane y coordinates (wires.ts, cross.ts), clamping the scale, hasSub.
  • minimalEdit lives in vscodeHost.ts but editor.ts uses it too; move it to source.ts.

Activity

  1. 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

    refactorwebviewThe 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