Skip to content

Introduce sms-api & qt-sms#442

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

Introduce sms-api & qt-sms#442
OrkunTokdemir wants to merge 75 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 2 times, most recently from 22342dc to 0f6a5d9 Compare April 21, 2026 11:19
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
The C++ service uses camelCase keys (scReplyChoice = "replyChoice",
scReplyText = "replyText") as defined in ipcconstants.h. Update the
TypeScript client and tests to match.
- Remove erroneous `* 100` multiplication; the service already
  reports progress in the 0–100 range
- Track previous percentage and pass `increment` to `progress.report`
  so the VS Code progress bar advances correctly
- Detect phase resets (e.g. Downloading → Installing) by checking
  when progress goes backwards and reset the baseline accordingly
- Include both the phase message and percentage in the notification
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch from 39bc199 to bfa9795 Compare May 6, 2026 13:42
Replace hardcoded `/tmp/qtclient_socket` with
`path.join(os.tmpdir(), 'qtclient_socket')` to resolve platform-specific
temporary directories correctly.

This ensures consistent behavior across platforms:
- macOS: /var/folders/…/T/qtclient_socket (matching Qt's QDir::tempPath())
- Linux: /tmp/qtclient_socket
- Windows: uses named pipes (different mechanism)
- Add "Get Started" view with an "Open Walkthrough" button
- Add "Qt Account" view showing sign-in/sign-out state:
  - Logged out: "Sign In" button via viewsWelcome content
  - Logged in: account email in view description and "Sign Out" button
- Add `qt-sms.openWalkthrough` command to open the walkthrough
- Add "Sign in to Qt Account" as first walkthrough step with
  auto-completion on login via `onContext:qt-sms.isLoggedIn`
- Split the install progress notification into two phases: a cancellable
  "Downloading" notification and a non-cancellable "Installing" one
- Add Packages.cancel() method to sms-api (packages/cancel IPC)
- Pass --no-console-log flag when spawning the SMS service
- Update backend URL to `api.install.qt.io`
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_sms_api_12_03_2026 branch from b15546d to 51b0acc Compare May 8, 2026 14:47
Support the new installation folder structure where Qt is installed under
QtFramework/<version>/<arch>/bin/. Add platform-specific architecture mapping
and pass the installed package version to registerInstalledQtPaths().
Add an installed-packages-store backed by globalState to remember
which Qt versions have been installed via the extension. On activation
(when logged in) and on login, sync the store from the SMS service.

In the Install Package command, query listInstalledPackages and merge
with globalState to build a complete set of installed versions, then
exclude them from the QuickPick so users only see what's available
for installation.
- Use Windows named pipe (\\.\pipe\qtclient_socket) as default socket
  path on Windows; Qt's QLocalServer creates named pipes, not Unix
  domain sockets
- Disable detached mode on Windows to prevent new console/process group
  creation; add windowsHide to suppress console windows
- Update integration test helper with matching platform-aware socket
path
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