Skip to content

Conversation

@sebjulliand
Copy link
Member

@sebjulliand sebjulliand commented Oct 27, 2025

Fixes #2618
Fixes #1451

Changes

This PR introduce a new Context view as a replacement to the Connection Profiles view.
It is intended to enhance the user experience regarding the management of Actions, Custom Variables and Profiles.
image

It also introduces a new CustomEditor class that works like CustomUI but allows to open custom editors instead of custom panels.

Actions

image

Actions are regrouped in three local categories, always displayed:

  • Member actions
  • Object actions
  • Streamfile actions

Optionally, there will be additional categories for each workspace declaring local actions (in a local .vscode/actions.json file). These categories are named after the workspace they come from.

The actions available at the Actions node level are:
image

  • Create a new action

  • Setup local actions

  • Search actions

    • Enables the user to search for actions by their name and command. Each matching action is highlighted in yellow and its description shows search match.
    image
  • Go to next search result

    • Gives focus in the list on the next item that matched the search
  • Clear search results

Creating a new action is also available on each Action Type node.
image

Clicking on an action opens the action editor. Making a change to the action will make the editor dirty and saving the action is done like in any editor, using Save (ctrl+s). The action panel was simply turned into an editor.
image

Right-clicking on an action gives access to these options:
image

Standard actions and local actions are managed the same way in the UI; they are saved in the connection settings or in the local workspace file depending on their nature.

When an editor is open, an inline action is available on each action to run it on the active editor:
image

Checking of the action can run on the active editor is done when the action is executed.

Custom Variables

image

Each variable declared in the current connection settings are listed here and can be created/changed/deleted from this view.
image
image

Clicking on variable lets you change its value.

Profiles

image

Command profiles and Connection profiles have been merged - a process will run when the extension starts to create profiles out of existing Command profiles and show a dialog to warn the user the Command profiles have been migrated.

Profiles can be created from the Profiles node using one of these inline actions:
image

  • Create an empty profile
    • Asks for the name of the new profile then opens the profile editor.
  • Create a new profile from the current settings
    • Asks for the name of the new profile then shows a notification to switch to it.
    image

Clicking on a profile opens the Profile editor that lets the user change some of the profile settings - object filters, IFS shortcuts and Custom variables are simply listed:
image
image

Right-clicking on a profile gives access to these options:
image

Activating a profile is done using the related inline action on the profile:
image

Activating a profile will replace the current settings with the profile's. Before the settings are replaced, they are saved back into the profile they belong to, or into the default profile if no profile was active (default profile is a unique profile with no name). This allows to automatically save the profile state before it gets erased.

The active profile is shown in green in the list, and it can't be deleted:
image

Its name is shown in the context description as well:
image

Switching back to the default profile is done using the action that appears on the Profiles node inline actions:
image

When a profile has a Library List Command (formerly a Command Profile), that command is ran and the library list is computed from it when the profile is activated. That operation can be re-run after the profile is made active by clicking the inline action on the profile item (the action only shows up if that profile has a library list command):
image

How to test this PR

  1. Create, edit, delete, rename, run actions
    a. Try generating local actions and make sure they are managed correctly in the local file
  2. Create, edit, delete, rename variables
  3. Create, edit, delete, rename, profiles
    a. Make sure custom variables are saved on the profile
    b. Make sure settings are correctly saved into the profile so they don't get lost when re-activating it
    c. Make sure the UI is consistent with the profile's content (views must be refreshed, etc)
  4. Try actions described in the PR 😅

Checklist

  • have tested my change
  • updated relevant documentation

sebjulliand and others added 12 commits October 20, 2025 14:00
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
@sebjulliand sebjulliand added this to the 3.0.0 milestone Oct 27, 2025
@sebjulliand sebjulliand requested a review from a team October 27, 2025 14:04
@sebjulliand sebjulliand self-assigned this Oct 27, 2025
@sebjulliand sebjulliand added the enhancement New feature or request label Oct 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

👋 A new build is available for this PR based on db2abef.

Copy link
Member

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

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

Initial review :)

@worksofliam
Copy link
Member

Personally I am not sure how I feel about the 'unload' being the refresh icon:

image

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@github-actions
Copy link
Contributor

👋 A new build is available for this PR based on f995092.

@sebjulliand
Copy link
Member Author

Personally I am not sure how I feel about the 'unload' being the refresh icon:
image

I reused what your past self picked 😅
image

But I agree this may be confusing. How about arrow-circle-left since arrow-circle-right is used to activate the profiles?

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@github-actions
Copy link
Contributor

👋 A new build is available for this PR based on 744abdd.

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand temporarily deployed to testing_environment October 27, 2025 18:16 — with GitHub Actions Inactive
…ited

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand
Copy link
Member Author

Back at you folks, I updated the icons and fixed the reported issues.
I also added additional checks so actions and profiles can't be renamed/deleted while being edited.

Copy link
Member

@SanjulaGanepola SanjulaGanepola left a comment

Choose a reason for hiding this comment

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

@sebjulliand Found a couple more issues during testing:

You can have custom variables with no value. Is this expected? If yes, it breaks loading items in the Object Browser (getting Cannot read properties of undefined (reading 'replace')):
image


Looks like there is an issue with the library list validation (maybe unrelated to the specific changes in this PR?) where it complains about the wrong library not existing. In the example below SANJULA exists, but not SANJULA1:

image

I also added additional checks so actions and profiles can't be renamed/deleted while being edited.

Should we do the same for Copy?


I listed below a couple more ideas having just played around with this more. Feel free to not do these if you think it is best as is or we can also do them in a different PR as well since this one is quite big.

  1. What do you think about adding icons to the Environment view tree item headings. This will also avoid having to adding additional descriptions such as workspace actions:
  • Actions: collection or code-oss
    • Member: file-code
    • Object: database
    • Streamfile: file-text or file
    • Workspace Folder: folder (we could then drop the workspace actions description?)
  • Custom Variables: variable-group
  • Profiles: account
  1. Similar to the search match yellow highlighting, what if we highlighted in blue for example which actions are usable based on the active editor?

@SanjulaGanepola
Copy link
Member

Found an issue with editing the Library List Command. Steps to reproduce:

  1. Create a profile
  2. Edit profile and set CHGLIBL LIBL(QGPL QTEMP) as Library List Command
  3. Set profile as active
  4. Edit or remove Library List Command
  5. Unload profile
  6. Go to edit the profile and see the edit you made was not persisted

@SanjulaGanepola
Copy link
Member

Other ideas:

  1. When we do a Launch Workspace Actions Setup..., can we auto refresh the view so it loads the new actions?
  2. When we get the Local actions are already defined for this workspace. Do you want to overwrite them? message, can we get an option to Append?

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand temporarily deployed to testing_environment November 30, 2025 10:59 — with GitHub Actions Inactive
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand
Copy link
Member Author

You can have custom variables with no value. Is this expected? If yes, it breaks loading items in the Object Browser (getting Cannot read properties of undefined (reading 'replace'))

@SanjulaGanepola, yes, having empty valued variables is allowed. But it doesn't seem to break the loading on my end.
Besides, an empty string isn't undefined and shouldn't break anything.

But I was able to reproduce the issue by manually removing the value of a variable in my user settings JSON, making it undefined. I'll check if there's a use path that creates variables with undefined values then.

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand temporarily deployed to testing_environment November 30, 2025 11:20 — with GitHub Actions Inactive
@sebjulliand
Copy link
Member Author

Found the issue...creating a variable and escaping the value prompt would create a variable with undefined value. I fixed that and also prevented loading undefined variable values, just to be safe.

Looks like there is an issue with the library list validation (maybe unrelated to the specific changes in this PR?) where it complains about the wrong library not existing. In the example below SANJULA exists, but not SANJULA1:
image

I couldn't reproduce this one. Since it pass the library list onto content.validateLibraryList, could you check your Code for i output after you see that dialog with the wrong library being reported? Since the name is valid, I assume that liblist is reporting something weird.

Should we do the same for Copy?

I don't think so. Copy will not break the configuration or create unexpected results if run on an item being edited.

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand temporarily deployed to testing_environment November 30, 2025 22:35 — with GitHub Actions Inactive
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand temporarily deployed to testing_environment December 1, 2025 20:17 — with GitHub Actions Inactive
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand deployed to testing_environment December 1, 2025 22:46 — with GitHub Actions Active
@sebjulliand
Copy link
Member Author

Thanks again for your review and your suggestions @SanjulaGanepola 😄
I did my best to fix the few remaining quirks and enhance the view based on your suggestions.

Here goes:

  • Added icons for nodes
  • Highlight in blue actions that can run on the active editor
    • Highlighted in green instead if it's a search match
    • Run action on editor inline action only active if the action is highlighted
  • Fixed the library list command not being saved after unloading a profile
  • Actions node refreshes itself whenever a local actions file is changed
  • Launch Workspace Actions Setup... will now offer to Append to the existing local actions, appending an index to the new action names to prevent duplicates

Back at you for a (hopefully) final review 😅 Thanks!

Copy link
Member

@SanjulaGanepola SanjulaGanepola left a comment

Choose a reason for hiding this comment

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

I couldn't reproduce this one. Since it pass the library list onto content.validateLibraryList, could you check your Code for i output after you see that dialog with the wrong library being reported? Since the name is valid, I assume that liblist is reporting something weird.

Found the problem with the library list -> In the screenshot below, SANJULA exists and SANJULA1 doesn't, but SANJULA is still found in the string so it complains about it:
image

Found another issue -> If you make some changes to a profile (ie. add/delete variables, change library list, add/delete filters) and then go to edit the profile, the contents displayed is outdated since it wasn't saved back to the profile yet. For example, the mis-matching variables below. Similar to 4bff5c3, maybe we need to apply changes back to the active profile directly?
image

if (!name) {
return l10n.t('Name cannot be empty');
}
else if (names.includes(name.toLocaleUpperCase())) {
Copy link
Member

Choose a reason for hiding this comment

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

This check failed for me since the items in names weren't also uppercased. We should make the same change in all validateName functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

5 participants