Skip to content

Introduce sms-api & qt-sms#442

Draft
OrkunTokdemir wants to merge 115 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_sms_api_12_03_2026
Draft

Introduce sms-api & qt-sms#442
OrkunTokdemir wants to merge 115 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_sms_api_12_03_2026

Conversation

@OrkunTokdemir

Copy link
Copy Markdown
Collaborator

No description provided.

@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch from 090c53f to 4d27dd8 Compare March 16, 2026 16:17
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch 3 times, most recently from 41d9cd4 to 1e8b129 Compare April 8, 2026 13:29
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch from 9eb50c7 to 3390a3a Compare April 10, 2026 17:01
@OrkunTokdemir OrkunTokdemir changed the title Introduce sms-api Introduce sms-api & qt-sms Apr 13, 2026
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch 3 times, most recently from 45ca481 to 576afe3 Compare April 22, 2026 08:20
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch 2 times, most recently from b15546d to 51b0acc Compare May 8, 2026 14:47
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch 3 times, most recently from d895bee to f0f8012 Compare June 1, 2026 11:26
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch 2 times, most recently from 0ad368d to 7c07a83 Compare June 5, 2026 15:47
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch 5 times, most recently from 888082a to 54cd65a Compare June 23, 2026 08:58
Implement missing IPC operations from the SMS client protocol spec:

- Add Cache class with updateCache (cache/update) and clearCache
  (cache/clear) methods
- Add Settings class with setSetting (settings/set) and getSetting
  (settings/get) methods
- Add service/message notification dispatch and onMessage callback
  in JobCallbacks
- Add optional message field to ProgressInfo
- Add placeholderText field to UserPrompt (parsed from placeHolderText)
- Make prompt type parsing case-insensitive, supporting lowercase
  variants (choice, text, file, directory) matching C++ behavior
- Export new types (MessageInfo) and classes (Cache, Settings)

Tests: Add cache.test.ts, settings.test.ts, and extend jsonrpc and
packages tests for message notifications, prompt type variants,
placeholderText, and progress message field.
Add ServiceLauncher class for on-demand service lifecycle management
with socket polling, process spawning, and error reporting.

Add Packages.createOffline() method for offline package creation.

Update types to match upstream C++ API:
- Add ServiceLifecycle error category and codes (ServiceNotFound,
  ServiceStartFailed, ServiceStartTimeout, ServiceStopFailed)
- Add InvalidRequestFormat and NetworkError error codes
- Renumber Service/Unknown categories and related error codes
- Rename PackageFilters.version to packageVersion, add packageId
- Add createOffline IPC method

Update integration tests:
- Add search, createOffline, and ServiceLauncher test cases
- Handle proper JSON-RPC error responses instead of expecting timeouts

Update unit tests:
- Add createOffline to command test matrix
- Add packageVersion/packageId filter key tests
- Use mock HOME dir so the service installs to a test-local path
  ($MOCK_HOME/Qt) instead of the real home directory
- Add install tests: install first available package, install
  non-existent package, list all packages
- Add post-install verification that checks extracted files exist
  and validates the installation journal contains the correct
  package ID and version
- Add onStdout/onStderr callbacks to ServiceLauncherOptions for
  observing service process output
- Capture stderr during startup and include it in error messages
- Detect early process exit and fail fast instead of polling until
  timeout
- Spawn service with stdio pipes instead of 'ignore'
- Add integration test suite (test:integration:launcher) covering
  start/stop lifecycle, error cases, already-running detection,
  Session connectivity, and start-stop-start cycles
Previously the walkthrough only installed the qt-cpp-pack extension
pack, then separately installed qt-core as pre-release. Extension
packs don't support installing their contents as pre-release, so
users ended up with release versions of qt-core, qt-cpp, qt-qml,
and qt-ui.

This caused a "t.get is not a function" activation error in qt-cpp
when qt-core was on pre-release but qt-cpp was on release. The
pre-release qt-core changed getQtInfo() to return a QtInfoResult
wrapper object ({ info, err }) instead of QtInfo directly, and the
release qt-cpp still expected the old return type, calling .get()
on the wrapper object which doesn't have that method.

Install each Qt extension (qt-core, qt-cpp, qt-qml, qt-ui)
individually with the installPreReleaseVersion flag, and install
qt-cpp-pack, cmake-tools, and cpptools as regular dependencies.
This ensures all Qt extensions are on their pre-release channel
from the start, avoiding version mismatch errors.
Move the alpha allowlist check to after both email and password
inputs are collected. The withProgress notification between the
two showInputBox calls was causing a focus shift, making the
walkthrough panel reclaim focus before the password prompt appeared.
When qt-sms installs required extensions, check if cmake-tools is
already installed but below the minimum version (1.22.16) needed for
CMake Presets support, and trigger an update if so.
Sign out the user before tearing down service state. Also remove
any qt-core.additionalQtPaths entries that point inside the
installation directory, leaving externally registered paths intact.
Replace the VS Code built-in walkthrough (defined in package.json) with
a custom webview-based walkthrough panel. The new panel tracks step
completion dynamically — sign-in, required extensions, Qt framework
installation, and first-app creation — and re-renders in response to
auth changes, extension installs/uninstalls, disk-level package changes,
and installation path updates. A webview serializer restores the panel
after window reloads.

Task-number: [VSCODEEXT-316](https://qt-project.atlassian.net/browse/VSCODEEXT-316)
The extension is named "Qt Software Management", so the correct
abbreviation is "qt-sm" rather than "qt-sms".

Rename the qt-sms/ folder to qt-sm/ and update all references:
extension name and EXTENSION_ID, command/view/container IDs, context
keys, configuration keys, localization keys, npm scripts, and the
VS Code launch/task configs.
A Qt installation can bundle CMake and Ninja executables under the
installation root's Tools/ directory. Detect them and inform qt-core/
qt-cpp of their locations via CoreAPI. Use a shared contract in qt-lib
(CoreKey.QT_TOOLS_PATHS and the QtToolsPaths type), and a
qt-tools-store.ts in qt-sm that detects the executables with
platform-aware layouts and publishes them.

Re-detect on activation (the root may have changed via QtCreator while
qt-sm was closed), on a live watch of Tools/, on installationPath
changes, and after an install completes. Only the qt-sm publisher side
is implemented here.
Add a link-style "Mark Done" button to the Get Started walkthrough that
closes it and sets the qt-sm.getStartedDone global setting. The flag is
also set on natural completion and cleared on reset, letting other
extensions like qt-core read whether onboarding is done.
The `opacity: 0.5` on locked rows made the circle fill translucent, so
the rail bled through the lock icon. Dim the glyph and title instead and
keep the circle fill opaque so it masks the rail.
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch from 12bf839 to 82ace93 Compare June 23, 2026 12:58
Add a second file-system watcher on the installation root's parent so
deleting the root (which removes QtFramework) refreshes the walkthrough.
Replace the single diskWatcher with a diskWatchers list to manage both.
ensureCoreVersion() only kept the installed Qt Core extension when it was
strictly newer than the required version, so an exact match (e.g. 1.15.1)
was needlessly reinstalled as a pre-release. Change the comparison to >= 0
so a version equal to the required one is kept as well.
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch from e6706ad to 1cf6fe4 Compare June 24, 2026 14:53
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch 2 times, most recently from a29699c to a1f37e2 Compare June 25, 2026 14:43
The Get Started walkthrough panel used the default webview placeholder icon
in its editor tab, unlike the Qt Welcome page. Set the panel's iconPath to
the themed dark/light Qt icons so both pages look consistent. The icon is
applied in wirePanel, so it also survives a window reload (serializer path).
The walkthrough's "Get latest Qt Framework" button was disabled whenever any
Qt version was installed on disk, so users with an outdated Qt could not grab
the newest release. Disable it only when the newest available version is
actually installed.

Determining "latest" requires the remote available-packages list, so it is
resolved asynchronously and cached. To avoid spawning the service or showing
progress UI just to compute a button state, the check only runs when a session
is already connected; otherwise the result is treated as unknown and the button
stays enabled (the safe direction). The state is refreshed when the panel opens
and after an install completes.
Show the installed package's version alongside its name in the
"Successfully installed" notification.
Pin the walkthrough app to the viewport height (height: 100vh) instead of
min-height so overflow-y has a fixed box to clip against, showing an internal
scrollbar when the content is taller than the screen.
Replace the remote allowlist fetch with a simple check that the Qt
Account email ends with @qt.io, dropping the network round-trip and
the allowlist file dependency.
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch from a1f37e2 to 21bc761 Compare June 25, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant