Skip to content

--app-name should set the page title #7688

Closed

Description

@code-asher

Will need to add a variable to the HTML files to set the title to the app name (login.html, error.html).

And will need to patch for the VS Code HTML (workbench.html, workbench-dev.html) although not entirely sure how the titles there are set. see below, we just need to set appName somehow

Activity

  1. added
    enhancementSome improvement that isn't a feature
    bugSomething isn't working
    and removed
    enhancementSome improvement that isn't a feature
    on Mar 2, 2026
  2. MicahZoltu commented on Mar 3, 2026

    @MicahZoltu
  3. code-asher commented on Mar 4, 2026

    @code-asher
    MemberAuthor

    Good point, if we do just the suffix we might get away with not even having to patch anything, but if we want to change the order we will have to patch for sure.

    I am not sure if we should make that change here though, it sounds useful enough to go into VS Code core, if they are willing to accept such a patch. Generally we want to avoid drifting from VS Code too far, especially for things that are not bugfixes.

  4. MicahZoltu commented on Mar 5, 2026

    @MicahZoltu
  5. MicahZoltu commented on Mar 5, 2026

    @MicahZoltu
    Contributor

    I went to file a feature request with VSCode and learned they have an entire setting suite for setting the title bar!

    Image

    I think that armed with this knowledge and the change to make --app-name apply everywhere my problem will be fixed. Thanks for the push to file upstream.

    It looks like right now when you use the ${appName} variable it is hard coded to code-server which I now understand in hindsight what was being discussed in #5935 (comment)

  6. code-asher commented on Mar 11, 2026

    @code-asher
    MemberAuthor

    Ohh that is really good to know! Nice find. Now I understand the appName comment as well hahaha

  7. code-asher commented on Mar 11, 2026

    @code-asher
    MemberAuthor

    So we just need this appName variable to be configurable. It might require patching, not entirely sure where it comes from. Maybe it pulls it from the product.json and we need to patch it to use a flag instead, so we can then pass it in from code-server.

  8. MicahZoltu commented on Mar 11, 2026

    @MicahZoltu
    Contributor

    According to my LLM:

    Source of ${appName}

    The ${appName} variable is derived from the product configuration, specifically from productService.nameLong.

    Key findings:

    1. Definition in code (src/vs/workbench/browser/parts/titlebar/windowTitle.ts:361):

      const appName = this.productService.nameLong;
      
    2. Interface definition (src/vs/base/common/product.ts:73-74):

      readonly nameShort: string;
      readonly nameLong: string;
      
    3. Product configuration source (src/vs/platform/product/common/product.ts):

      • The nameLong value comes from the IProductConfiguration interface
      • It's loaded from product.json at build time
      • When running from source (development mode), it defaults to 'Code - OSS Dev'
      • For built releases, it's injected during the build process
    4. Settings UI documentation (src/vs/workbench/browser/workbench.contribution.ts:807):

      localize('appName', "`${appName}`: e.g. VS Code.")
      

    Summary:

    The ${appName} variable is not an environment variable or CLI option. It's a build-time constant from the product configuration (product.json) that gets injected into the application during the build process. The value represents the full product name (e.g., "Visual Studio Code", "Code - OSS Dev", etc.) and is accessed through the IProductService service.

  9. MicahZoltu commented on May 9, 2026

    @MicahZoltu
    Contributor

    Is there any progress on this?

    Due to increases in supply chain attacks and vulnerability discoveries, I am now doing all of my dev work inside docker containers using code-server, but now my browser tab bar is full of tabs that are all named exactly the same which is quite problematic for productivity (I spend a lot of time searching for the right tab).

    This feels like an easy fix, but maybe it is more complicated than it looks at first glance?

  10. code-asher commented on May 12, 2026

    @code-asher
    MemberAuthor

    It did appear pretty simple but the PR seems to have been abandoned and I have not had a chance to pick it up: #7725

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions