Repository navigation
ADFA-4128 (11/11): app + bench — wiring Quick Build into the IDE and the benchmark harness #1723
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
fryanpan
merged 85 commits into
feature/ADFA-4128-qb-10-gradle-plugin
from
feature/ADFA-4128-qb-11-app
Oct 2, 2026
Merged
Changes from all commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
cdf75d6
ADFA-4128: style: spotless reformat of the build-status layout, no fu…
fryanpan 5e0dcfc
style: spotless reformat of SaveFileAction.kt, no functional change
fryanpan eb0989e
ADFA-4128: qb 11/11 app + bench — wires Quick Build into the IDE and …
fryanpan 5bb44d0
ADFA-4128: qb 11 review fixes — install rotation window, flag-off int…
fryanpan 71a404f
ADFA-4128: state the daemon-timeout rationale without a benchmark mul…
fryanpan 5455824
ADFA-4128 (11/11): address CodeRabbit review
fryanpan 8039a6d
ADFA-4128: manual-QA script fixes from the 22-test device walk
fryanpan 5d8ea60
ADFA-4128: doc corrections from the PR review sweep
fryanpan d383ce2
ADFA-4128: three small UX fixes found by the manual QA walk
fryanpan e8eac11
ADFA-4128: record the v1 blocking decision instead of proposing it
fryanpan 000ab72
ADFA-4128: qb 12 review fixes - two doc corrections held on the trail…
fryanpan f17fd82
ADFA-4128: two review fixes - a repeated clobber prompt and a hard-co…
fryanpan 850efa1
ADFA-4128: the CoGo reload-crashed notice carries the same text as th…
fryanpan 6788851
ADFA-4128: resolve ProvisioningFailedUnexpectedly to a user-facing st…
fryanpan a98129e
ADFA-4128: reliability-gaps #89 is fixed in-stack, not open
fryanpan 6785e20
ADFA-4128: 0902 review round on the app wiring
fryanpan ee34f5d
ADFA-4128: stop a re-subscribe re-stomping the bar with the start-fai…
fryanpan cf4e43b
ADFA-4128: correct the Koin module's "nothing spawns" claim
fryanpan 65f45c9
ADFA-4128: the status line cannot be read by swiping the sheet up
fryanpan 0e90975
ADFA-4128: style: spotless reformat of QuickBuildStatusBar, no functi…
fryanpan 618f3e8
ADFA-4128: delete the requestDowngrade parameter and its plumbing
fryanpan 1a44679
ADFA-4128: give DaemonStartFailed the user-facing string it was missing
fryanpan 8002760
ADFA-4128: build the Quick Build graph off the main thread
fryanpan 296916e
ADFA-4128: pin the failed-start tone to the session's lifetime
fryanpan 4c3987c
ADFA-4128: size the collapsed sheet header to the status text, not to…
fryanpan f56aca3
ADFA-4128: give the swipe hint room inside the collapsed sheet
fryanpan 75bb3c6
ADFA-4128: keep the collapsed sheet at its earlier height
fryanpan 5d687cf
ADFA-4128: request a header layout only when the status height changed
fryanpan 7bc9cd3
ADFA-4128: a manifest save runs generateSources again
fryanpan 7162e8b
ADFA-4128: spell the product "Code on the Go" in the unknown-app dialog
fryanpan 72156e6
ADFA-4128: hand status-line ownership to every writer, the debugger i…
fryanpan a71ef58
ADFA-4128: arm the bench standard-build latch only once the build hol…
fryanpan 86f49ab
ADFA-4128: never fire a bench autostart against another project's wor…
fryanpan 5af15e8
ADFA-4128: build the Quick Build graph once, off the main thread, and…
fryanpan e273a85
ADFA-4128: never wipe the daemon directory under a live compile daemon
fryanpan 224214a
ADFA-4128: cover the analytics sink's fallbacks, route and outcome names
fryanpan 5b4bce9
ADFA-4128: adopt the suspend contracts and surface compile diagnostic…
fryanpan 304d69f
ADFA-4128: lay the collapsed header out inside the window so the swip…
fryanpan 2760b6d
ADFA-4128: tidy the stager KDoc and the no-op autostart branch
fryanpan 9e41ceb
ADFA-4128: keep the deferral's own generateSources build out of the h…
fryanpan eb8799e
ADFA-4128: size the header for the status block only while it is the …
fryanpan 203c4fe
ADFA-4128: let an unknown-id consent at tap time cover the id the ins…
fryanpan 21e38d0
ADFA-4128: await the clobber confirmations on the tap path
fryanpan 16ce396
ADFA-4128: post one Quick Build save event per save operation
fryanpan 361ecd6
ADFA-4128: abort a Run whose pre-build save found the editor gone
fryanpan af81480
ADFA-4128: do not count a Quick Build stop tap as a feature use
fryanpan f11c3a6
ADFA-4128: ASCII ellipsis in the truncated Gradle cause
fryanpan d4ff142
ADFA-4128: pass the rejection to the repeated-connect debug log
fryanpan c133221
ADFA-4128: carry the reinstalled app's uid on a rebuild success
fryanpan f3e2666
ADFA-4128: manual QA case for Run during the eager proxy-app build
fryanpan 2fadc86
ADFA-4128: Run Tasks must not inherit a Run tap's clobber answer
fryanpan 6f672de
ADFA-4128: carry a skipped relaunch as an absent relaunchOk through t…
fryanpan d5b1a61
ADFA-4128: route a created or deleted resource file through the gener…
fryanpan a53b2dc
ADFA-4128: only grow the collapsed sheet while a build narrates
fryanpan 0015230
ADFA-4128: gate the Restart session row like the button
fryanpan 7c3585f
ADFA-4128: hand the outer internal build its progress listener back
fryanpan 835d014
ADFA-4128: read the saved file, not the editor's, for the resource flag
fryanpan e352801
ADFA-4128: reset the narrator after the pane unbinds, and drop what f…
fryanpan fe00c46
ADFA-4128: an empty slot at tap time is not widened by an unparseable…
fryanpan 2fd50e3
ADFA-4128: run the prebuild fire inside the stagger's own catch
fryanpan 7b214a0
ADFA-4128: use the intent-extra constant in the bench activity
fryanpan e15bf1e
ADFA-4128: count a Quick Build feature use only when a build starts
fryanpan 1b74ccf
ADFA-4128: say in GradleBuildTuner's KDoc that it is Experiments-only
fryanpan 27bb78b
ADFA-4128: gate the won't-stay-up dialog's Restart like the button
fryanpan 6d9c082
ADFA-4128: hold the narrator's discard until the old teardown is quiet
fryanpan 20009f4
ADFA-4128: expect the tap's RecordAsk in the prebuild stagger's reduc…
fryanpan d2aa04b
ADFA-4128: scope the narrator's teardown drop to the build that closed
fryanpan b869757
ADFA-4128: decide the won't-stay-up notice's Restart at the tap, not …
fryanpan 203e305
ADFA-4128: cut the Material alert dialog's vertical insets to 24dp
fryanpan e185e36
ADFA-4128: give :app a JaCoCo report task, pointed at the ASM-transfo…
fryanpan a72db49
ADFA-4128: cover six Quick Build app-layer seams with unit tests
fryanpan 51c01a6
ADFA-4128: decide the save's follow-up work outside the activity
fryanpan 2f4274c
ADFA-4128: decide the standard-Run clobber confirm outside the activity
fryanpan 1b2b721
ADFA-4128: cover ApkInstallationViewModel.reloadStatus's four fall-ba…
fryanpan 282992a
ADFA-4128: pin the provisioner's eight refusal arms, signing refusal …
fryanpan cdcf85f
style: spotless reformat of the dialog-inset comment, no functional c…
fryanpan 9a2ffed
ADFA-4128: pin the narrator's 30 s mute cap, its per-reset token and …
fryanpan 9e4fa51
ADFA-4128: unregister the install session callback even with no sessi…
fryanpan a77f0ab
ADFA-4128: label the blocked Quick Build row "Building…"
fryanpan d1a52db
ADFA-4128: regenerate sources for a save under the selected variant's…
fryanpan a05ba09
ADFA-4128: style: spotless reformat, no functional change
fryanpan 8110237
ADFA-4128: keep Run tasks and Sync usable during Quick Build's prebuild
fryanpan 74a6aba
ADFA-4128: correct two manual-QA criteria that no build can satisfy
fryanpan 7079556
ADFA-4128: name the real cause of T23's missing Manifest class
fryanpan 0733ca1
ADFA-4128: drop T23's editor-side criterion instead of explaining it
fryanpan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
92 changes: 92 additions & 0 deletions
92
app/src/androidTest/kotlin/com/itsaky/androidide/QuickBuildFlagOffTest.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| package com.itsaky.androidide | ||
|
|
||
| import androidx.test.core.app.ActivityScenario | ||
| import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
| import androidx.test.platform.app.InstrumentationRegistry | ||
| import com.itsaky.androidide.activities.SplashActivity | ||
| import com.itsaky.androidide.activities.editor.EditorHandlerActivity | ||
| import com.itsaky.androidide.app.configuration.IJdkDistributionProvider | ||
| import com.itsaky.androidide.helper.isExperimentsFlagSet | ||
| import com.itsaky.androidide.helper.setExperimentsFlagForTest | ||
| import com.itsaky.androidide.helper.waitForMainHomeOrEditorUi | ||
| import com.itsaky.androidide.screens.QuickBuildScreen.assertQuickBuildButtonAbsent | ||
| import com.itsaky.androidide.screens.QuickBuildScreen.assertQuickBuildButtonShown | ||
| import com.itsaky.androidide.utils.EditorActivityActions | ||
| import com.kaspersky.kaspresso.testcases.api.testcase.TestCase | ||
| import org.junit.Test | ||
| import org.junit.runner.RunWith | ||
|
|
||
| private const val TOOLBAR_TIMEOUT_MS = 15_000L | ||
|
|
||
| /** | ||
| * The shipping-state gate for Quick Build (ADFA-4128, manual test T13): with no | ||
| * `CodeOnTheGo.exp` flag file on the device, the feature must be invisible. | ||
| * | ||
| * The gate is a single read of [com.itsaky.androidide.utils.FeatureFlags.isExperimentsEnabled] | ||
| * at [EditorActivityActions.register], so this drives that decision directly instead of | ||
| * restarting the process: flip the flag, re-register, rebuild the toolbar, look. That also | ||
| * makes the test honest about what it covers - the registration site, not the process-start | ||
| * caching around it. | ||
| * | ||
| * Both directions run in one test on purpose. An absence assertion alone passes when the | ||
| * accessibility selector rots or the toolbar simply never rendered, so the flag-on step | ||
| * ahead of it is load-bearing, not decoration. | ||
| * | ||
| * Runs after [QuickBuildSmokeTest] in [OrderedTestSuite], which leaves the editor open on a | ||
| * synced project - this test needs a populated editor toolbar and creates no project of its | ||
| * own. | ||
| */ | ||
| @RunWith(AndroidJUnit4::class) | ||
| class QuickBuildFlagOffTest : TestCase() { | ||
| private var hadExperimentsFlag = false | ||
|
|
||
| @Test | ||
| fun test_noExperimentsFlagHidesQuickBuild() = | ||
| before { | ||
| // A dev device may legitimately have experiments enabled; restore whatever | ||
| // state this test found. | ||
| hadExperimentsFlag = isExperimentsFlagSet() | ||
| IJdkDistributionProvider.getInstance().loadDistributions() | ||
| }.after { | ||
| setExperimentsFlagForTest(hadExperimentsFlag) | ||
| // Leave the toolbar matching the restored flag so a later test does not | ||
| // inherit this one's registry. | ||
| runCatching { rebuildEditorToolbar() } | ||
| }.run { | ||
| step("Launch app") { | ||
| ActivityScenario.launch(SplashActivity::class.java) | ||
| waitForMainHomeOrEditorUi(device.uiDevice) | ||
| } | ||
|
|
||
| step("Experiments on: the toolbar carries Quick Build") { | ||
| setExperimentsFlagForTest(true) | ||
| rebuildEditorToolbar() | ||
| assertQuickBuildButtonShown(TOOLBAR_TIMEOUT_MS) | ||
| } | ||
|
|
||
| step("Experiments off: the toolbar drops Quick Build") { | ||
| setExperimentsFlagForTest(false) | ||
| rebuildEditorToolbar() | ||
| assertQuickBuildButtonAbsent(TOOLBAR_TIMEOUT_MS) | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Re-runs action registration and repopulates the toolbar, which is what an editor | ||
| * launch does. On the main thread: both touch the actions registry and the toolbar | ||
| * views. | ||
| */ | ||
| private fun rebuildEditorToolbar() { | ||
| val instrumentation = InstrumentationRegistry.getInstrumentation() | ||
| val activity = resumedEditorActivity() | ||
| instrumentation.runOnMainSync { | ||
| EditorActivityActions.register(activity) | ||
| activity.prepareOptionsMenu() | ||
| } | ||
| instrumentation.waitForIdleSync() | ||
| } | ||
|
|
||
| private fun resumedEditorActivity(): EditorHandlerActivity = | ||
| device.activities.getResumed() as? EditorHandlerActivity | ||
| ?: error("Resumed activity is not the editor; this test needs an open project") | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.