Skip to content

feat: allow configuring display apps from template #9100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 30, 2023
Merged

Conversation

sreya
Copy link
Collaborator

@sreya sreya commented Aug 15, 2023

This PR implements the control plane portion of the display_apps field.

  • The default behavior for the field is to opt-in to all apps (except vscode_insiders).
  • To opt-out of all you must specify false to all fields.
  • Otherwise you only get the apps that you explicitly set to true.

This PR implements both the backend and frontend portions of the feature. Notably on the frontend the dropdown for VSCode Desktop ceases to be a dropdown if only one of VSCode Desktop or VSCode Insiders is enabled.

Some screenshots:

displays_apps {}
Screenshot 2023-08-28 at 5 29 28 PM
display_apps {
  vscode = false
  vscode_insiders = true
}
Screenshot 2023-08-28 at 5 35 39 PM
display_apps {
  vscode_insiders = true
}
Screenshot 2023-08-28 at 5 41 18 PM

fixes #8033

@sreya sreya marked this pull request as ready for review August 18, 2023 22:30
@sreya sreya changed the title feat: add default_apps field to agent feat: allow disabling default apps from template Aug 18, 2023
@sreya sreya changed the title feat: allow disabling default apps from template feat: allow configuring display apps from template Aug 24, 2023
@sreya sreya force-pushed the jon/defaultapps branch 9 times, most recently from 3ef47ec to d6f467c Compare August 28, 2023 22:42
@sreya sreya requested a review from mtojek August 28, 2023 22:43
@sreya sreya force-pushed the jon/defaultapps branch 3 times, most recently from fda5adc to a71e3c8 Compare August 28, 2023 23:41
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first review round is done. Good job!

@@ -1,6 +1,6 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many files changes in testdata, can we limit changes to only relevant ones?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran the generate.sh script 🤷 . I could remove all the unrelated changes but given I'm just running our dogfood image I don't think it's a big deal to go ahead and update them now. Especially if it'll keep happening to others. No strong opinion here though.

type DisplayApp string

const (
DisplayAppVSCodeDesktop DisplayApp = "vscode"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQ: do we need to take any action on the API level based these enum values? Maybe codersdk/API can be just a "dumb proxy", I mean "any" app.

Copy link
Collaborator Author

@sreya sreya Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No not really it's mainly for discoverability and it also helps with the generated typescript types but I also don't mind removing it, wdyt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My idea is to reduce the number of places to update when you add another application, so if we don't intend to use let's just drop it. Unless we will use it in TypeScript/site, then we can leave it 👍

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation LGTM 👍 but please take a look at e2e tests as it is failing for webTerminal? maybe it is just flake

@sreya sreya merged commit ee24260 into main Aug 30, 2023
@sreya sreya deleted the jon/defaultapps branch August 30, 2023 19:53
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make helper apps optional (e.g. “VS Code Desktop”)
3 participants