You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tt.py needed a manifest.properties to know which SDK version to download. Commands like shell, push, pull and screenshot don't need an app, but still forced you into an app folder, or into answering a "generate a new project?" question first.
What changed
Device info handout (firmware)
development-module has a new info hello mode on the existing TLS port 6667. The server answers one JSON line and closes the connection:
No client certificate, no trust prompt, no session slot and no session app. The info isn't sensitive.
Values come from CONFIG_TT_DEVICE_VENDOR, CONFIG_TT_DEVICE_NAME_SIMPLE, CONFIG_TT_DEVICE_ID and TT_VERSION.
Other modes are unchanged, and command is still shell-only.
Documented in the module README. Unit tests cover the hello parsing and the info line. A server test checks that no prompt is raised.
SDK version selection (tt.py)
Without a project, the SDK version is picked in this order:
manifest.properties in ., Apps/*/ or apps/*/. A project always wins, and nothing else is read, queried or asked.
.tactility/sdk_version in the current folder (set with tt sdk <version>).
The version reported by the device from tt host.
A prompt. The answer is stored in .tactility/sdk_version, so it's asked once per folder.
tt.py queries the device with stdlib ssl, without verifying the certificate and without a client identity.
Built-in host and sdk commands
Both only read and write .tactility/ in the current folder, so they no longer need an SDK. This also fixes tt host <new> first querying the previously stored host and failing with "No route to host".
tt host prints the stored host or none. tt host <hostname> stores it, asks the device for its info and prints it. A failed query only warns.
tt sdk prints the SDK version in use and its source (project, local setting, or device). When a project is found, it says that a stored version isn't used. tt sdk <version> stores a version.
Tools/host.py is removed. _device_host.py stays, since app.py and shell.py read the same file.
tt app create replaces the "generate a new project?" question
The question and the project generation are gone from tt.py.
app.py has a new create action. It asks for the project type, package id, app id and app name, and uses the SDK version tt selected. It refuses if manifest.properties or main/ already exist.
The templates (Buildscripts/TactilitySDK/NewProject/) now ship inside tools.zip under NewProject/. new-project.zip, its index.json entry and Buildscripts/CDN/new_project.py are removed. release-tools-current.py and the CI actions copy NewProject/ into the tools folder.
tt.py reads prompt answers one byte at a time. Otherwise piped answers would be swallowed before app.py starts.
Notes for review
Dev versions: the device sends TT_VERSION as-is, for example 0.8.0-dev. This only works if the CDN has sdk/<that version>/.
Platforms: the device path passes no platform list, so only the tools are installed. tt app build still needs a manifest for its platforms.
Precedence: a stored .tactility/sdk_version beats the device, even after the host is changed. Delete the file to switch back to the device.
Older SDKs: an SDK published before this change has no NewProject/ in its tools, so tt app create fails for it with "has no new project templates".
Summary by CodeRabbit
New Features
Create GUI, terminal, and module projects with app create, then build them separately.
Use the built-in tt host and tt sdk commands to manage device and SDK settings. Without a project manifest, SDK selection can use a stored version, device information, or an interactive prompt.
Query device information using the development protocol without a client certificate.
Documentation
Clarified the device information exchange in the development-module guide.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
Walkthrough
SDK packaging now includes project templates in the tools tree, and the app tool creates GUI, terminal, and module projects from those templates. The CLI adds built-in host and SDK commands and checks saved and device SDK versions during target selection. The development protocol adds an info mode that returns device details in a JSON line without requiring a client certificate or prompt.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 52.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly identifies the main objective: making tt.py work as a standalone tool. The supporting changes to SDK selection, project creation, device information, and tests are consistent with …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title clearly identifies the main objective: making tt.py work as a standalone tool. The supporting changes to SDK selection, project creation, device information, and tests are consistent with that objective.
Full details: Docstring Coverage
Explanation
Docstring coverage is 52.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 21 functions across 13 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Cover the real query_device_info success path with a test.
test_sdk_shows_the_device_version_when_it_leads replaces query_device_info with a lambda, so the parser in tt.py never runs in that test. The Python host tests cover only the failure path, and no Python test serves a successful info reply. A change to the TLS hello, the newline framing, or the info/version keys can leave the suite passing. In that case sdk falls back to none after a stderr message.
Add a test that starts a local TLS listener, sends one newline-terminated JSON line with status and info.version, and asserts that the real query_device_info returns that version. The device answers the info hello without a client certificate (Modules/development-module/source/server.cpp:284-288), so the test listener needs no client-certificate setup.
The new an info hello is answered without a prompt test connects with &identity(0), so it always sends a client certificate. If the server began to require a certificate for info, this test would still pass. The existing certificate-less test uses only shell mode, so no test covers a certificate-less info hello.
Add a test that connects with TestClient(nullptr) in info mode and expects the request to be accepted.
Suggested test
CHECK_EQ(promptCount, 0);
}
+TEST_CASE("an info hello is answered without a client certificate") {+ ensureFixture();+ promptCount = 0;++ TestClient client(nullptr);+ const std::string line = connectAndGreet(client, "info");+ CHECK_NE(line.find(R"("status":"accepted")"), std::string::npos);+ CHECK_EQ(promptCount, 0);+}+
TEST_CASE("a client that is accepted once gets a shell") {
Assert that the info session closes after its response.
The new info-mode test reads the greeting line but does not check that the server closes the connection. A server that sent the line and kept the session open would still pass. The info branch closes the session, and the README documents the close, so this assertion guards that documented behavior. No other test covers it.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tt.pyneeded amanifest.propertiesto know which SDK version to download. Commands likeshell,push,pullandscreenshotdon't need an app, but still forced you into an app folder, or into answering a "generate a new project?" question first.What changed
Device info handout (firmware)
development-modulehas a newinfohello mode on the existing TLS port 6667. The server answers one JSON line and closes the connection:{"status":"accepted","info":{"vendor":"LilyGO","name":"T-Deck","id":"lilygo-tdeck","version":"0.8.0"}}CONFIG_TT_DEVICE_VENDOR,CONFIG_TT_DEVICE_NAME_SIMPLE,CONFIG_TT_DEVICE_IDandTT_VERSION.commandis still shell-only.SDK version selection (
tt.py)Without a project, the SDK version is picked in this order:
manifest.propertiesin.,Apps/*/orapps/*/. A project always wins, and nothing else is read, queried or asked..tactility/sdk_versionin the current folder (set withtt sdk <version>).versionreported by the device fromtt host..tactility/sdk_version, so it's asked once per folder.tt.pyqueries the device with stdlibssl, without verifying the certificate and without a client identity.Built-in
hostandsdkcommandsBoth only read and write
.tactility/in the current folder, so they no longer need an SDK. This also fixestt host <new>first querying the previously stored host and failing with "No route to host".tt hostprints the stored host ornone.tt host <hostname>stores it, asks the device for its info and prints it. A failed query only warns.tt sdkprints the SDK version in use and its source (project, local setting, or device). When a project is found, it says that a stored version isn't used.tt sdk <version>stores a version.Tools/host.pyis removed._device_host.pystays, sinceapp.pyandshell.pyread the same file.tt app createreplaces the "generate a new project?" questiontt.py.app.pyhas a newcreateaction. It asks for the project type, package id, app id and app name, and uses the SDK versionttselected. It refuses ifmanifest.propertiesormain/already exist.Buildscripts/TactilitySDK/NewProject/) now ship insidetools.zipunderNewProject/.new-project.zip, itsindex.jsonentry andBuildscripts/CDN/new_project.pyare removed.release-tools-current.pyand the CI actions copyNewProject/into the tools folder.tt.pyreads prompt answers one byte at a time. Otherwise piped answers would be swallowed beforeapp.pystarts.Notes for review
TT_VERSIONas-is, for example0.8.0-dev. This only works if the CDN hassdk/<that version>/.tt app buildstill needs a manifest for its platforms..tactility/sdk_versionbeats the device, even after the host is changed. Delete the file to switch back to the device.NewProject/in its tools, sott app createfails for it with "has no new project templates".Summary by CodeRabbit
app create, then build them separately.tt hostandtt sdkcommands to manage device and SDK settings. Without a project manifest, SDK selection can use a stored version, device information, or an interactive prompt.