Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Wrongmain.tf file can be auto-selected when opening template in built-in web editor #16360

Closed
Assignees
mtojek
Labels
s3Bugs that confuse, annoy, or are purely cosmetic
@Parkreiner

Description

@Parkreiner

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When a user goes to open a template from within our built-in template editor, it tries to auto-select themain.tf file, as that will likely be there the majority of the code will live. This works fine for simpler templates.

The problem is that, when you have multiplemain.tf files (e.g., one at the root directory, and another in a sub-directory), the auto-selection logic seems to try to select the firstmain.tf file it can find. As subdirectories are listed first in the editor, that means that the less relevant, secondarymain.tf file will always be selected, and the user has to click the correct one.

Relevant Log Output

N/A

Expected Behavior

When a user opens a template in the built-in editor, the auto-selection logic will favor themain.tf file at the root directory (if it exists). All othermain.tf files will not be eligible for auto-selection, so if the root file is missing, the main text area will start off empty.

Steps to Reproduce

  1. Create a template with twomain.tf files. One should go in the root directory, and the other should go in a subdirectory
  2. Open the template in the built-in web editor
  3. See that the subdirectory'smain.tf file is selected, even if it barely has any bearing on the overall template functionality

Note for Dogfood: this already applies to the current Coder on Coder template

Environment

  • Host OS: Dogfood
  • Coder version: v2.18.5

Metadata

Metadata

Assignees

Labels

s3Bugs that confuse, annoy, or are purely cosmetic

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp