ADFA-365 - Project build Test for java and Base project tamplate#3
Merged
Conversation
- add Manifest file to the e2e tests to support an application class - fixed problem with toolmanager - finished test
fryanpan
added a commit
to fryanpan/CodeOnTheGo
that referenced
this pull request
May 8, 2026
Smoke-tests the half of the plugin -> IdeTemplateService -> New Project
grid pipeline that lives on the plugin side: build a .cgt via the same
CgtTemplateBuilder surface FormsPlugin uses on activate / wizard finish,
then unzip and assert that templates.json, the per-template template.json,
the .peb-suffixed template files, and the static asset files all land at
the paths ZipTemplateReader / ZipRecipeExecutor look for.
Pins the Pebble syntax conversion ({{ APP_NAME }} -> ${{ APP_NAME }})
since the runtime Pebble engine is configured with the ${{ }} print
delimiter — a regression here would silently emit unrendered template
files into generated projects.
Pins sanitizePath rejecting absolute paths and `..` traversal — the
review checklist's appdevforall#3 (path traversal) is a recurring flag and this
keeps the plugin's contribution honest.
Pulls plugin-api into the test classpath so the tests can reach
CgtTemplateBuilder directly without mocking PluginContext.
fryanpan
added a commit
to fryanpan/CodeOnTheGo
that referenced
this pull request
May 8, 2026
Maps shipped 0 unit tests; both Forms and XKCD ship JVM unit tests as the
local style. Add a JUnit 4 scaffold with three test files covering the
load-bearing math + safety claims:
- RegionCacheTest: regionId allowlist (path-traversal vectors per
REVIEW2.md MB1 / theme appdevforall#3), delete idempotence, symlink-escape
refusal, malformed/missing meta.json fallback, list-sort,
bbox parse/drop semantics. 17 tests.
- BboxTest: construction guards (anti-meridian rejection), boundary-
inclusive contains(), width/height/area math at equator and 45°,
aroundPoint() longitude scaling at high lat, lat clamp at poles,
haversine sanity (SF↔NYC). 16 tests.
- TileEstimatorTest: known-good slippy counts (z=0/1/2 worldwide,
z=0..2 sum, mid-latitude box at z=14), zoom range guards, ~4×
growth per zoom level, MB conversion. 9 tests.
The exercise surfaced a real correctness bug in TileEstimator.estimate:
the destructuring `val (xMin, yMax) = lonLatToTile(west, north, z)` /
`val (xMax, yMin) = lonLatToTile(east, south, z)` had y reversed —
slippy maps NORTH to LOW y, so NW→(xMin, yMin) and SE→(xMax, yMax). The
bug made `(yMax - yMin + 1)` always negative; `coerceAtLeast(0)` then
silently produced **zero tiles for every estimate**. Fix is the obvious
swap; tests assert the published z=0/1/2 worldwide counts (1, 4, 16).
Also adds:
- `Bbox.contains(lat, lon)` (boundary-inclusive) so callers don't
re-implement the lat/lon `in` check.
- `Bbox.areaKm2()` for plan §5.2 size-estimate math.
- `RegionCache.listFromRoot(root)` / `deleteFromRoot(root, id)` /
`readDir(dir)` overloads taking explicit roots, so JVM tests can
bypass `Environment.getExternalStorageDirectory()`. Production
callers go through the no-arg variants unchanged.
Total: 42 tests, all passing. Build green for both `assembleDebug` and
`testDebugUnitTest`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jatezzz
pushed a commit
that referenced
this pull request
Jun 22, 2026
ADFA-365 - Project build Test for java and Base project tamplate
jatezzz
added a commit
that referenced
this pull request
Jul 17, 2026
Fan-out, adapter, and plugin-API fixes from the ProjectSearchExtension review: - Guard plugin results against null elements (mapNotNull) and wrap the collection block in a logging try/catch so a bad element no longer kills the whole fan-out silently. (#1) - buildRows buffers each section's rows and emits the header only when a group exists, skipping blank titles -- no more orphan/blank headers suppressing the empty state. (#2) - Move the fan-out to lifecycleScope so a slow plugin can't pin a destroyed Activity/ViewModel or post to a dead Activity. (#3) - Keep the search progress indicator up when the built-in search is empty but plugins are enabled, so a plugin-only match doesn't flash a terminal "no results" state. (#4) - SearchListAdapter is now a ListAdapter + DiffUtil reused across emissions; the two-phase publish diffs instead of reallocating, preserving scroll and already-run highlights. (#5) - Collapse the adapter constructors to one clicks ctor plus a thin map convenience ctor; drop the dead keys param and nullable-value scrub. (#6) - Replace the blocking .get(10s) with a non-blocking withTimeoutOrNull + await so no commonPool worker is tied up. (#7) - Trim pipe-split filter tokens at the source (endsWith(" kt") matched nothing in built-in search too); align ProjectSearchExtension KDoc with actual behavior and drop the non-ASCII em-dash. (#9, #10)
jatezzz
added a commit
that referenced
this pull request
Jul 20, 2026
Fan-out, adapter, and plugin-API fixes from the ProjectSearchExtension review: - Guard plugin results against null elements (mapNotNull) and wrap the collection block in a logging try/catch so a bad element no longer kills the whole fan-out silently. (#1) - buildRows buffers each section's rows and emits the header only when a group exists, skipping blank titles -- no more orphan/blank headers suppressing the empty state. (#2) - Move the fan-out to lifecycleScope so a slow plugin can't pin a destroyed Activity/ViewModel or post to a dead Activity. (#3) - Keep the search progress indicator up when the built-in search is empty but plugins are enabled, so a plugin-only match doesn't flash a terminal "no results" state. (#4) - SearchListAdapter is now a ListAdapter + DiffUtil reused across emissions; the two-phase publish diffs instead of reallocating, preserving scroll and already-run highlights. (#5) - Collapse the adapter constructors to one clicks ctor plus a thin map convenience ctor; drop the dead keys param and nullable-value scrub. (#6) - Replace the blocking .get(10s) with a non-blocking withTimeoutOrNull + await so no commonPool worker is tied up. (#7) - Trim pipe-split filter tokens at the source (endsWith(" kt") matched nothing in built-in search too); align ProjectSearchExtension KDoc with actual behavior and drop the non-ASCII em-dash. (#9, #10)
jatezzz
added a commit
that referenced
this pull request
Jul 20, 2026
…#1528) * feat(search): add ProjectSearchExtension API for plugin result sections Fan out to enabled plugins after built-in search and render their sections. * style: apply spotless formatting to search extension files * fix(search): address review findings on plugin search extension - Bound plugin search fan-out with a 10s timeout and drop results from superseded searches via a generation counter in EditorViewModel - Guard against Java plugins completing their future with null - Flatten SearchListAdapter's nested RecyclerView into Row.Match rows so match rows recycle instead of inflating all at once - Narrow catch(Throwable) to catch(Exception) per REVIEW.md - Document plugin-api search contract types; coordinates are 0-based, end-exclusive - Marshal plugin crash recording to the UI thread and drop the unread searchResults flow. * fix(search): address review feedback on search results list - Make the group row's LinearLayout the layout root so the click listener on binding.root receives taps (the clickable child was consuming them) and drop the redundant RelativeLayout wrapper - Log highlight failures via SLF4J and keep the plain-text preview instead of overwriting the line with the matched text - Skip files with empty match lists to avoid dangling group headers - Hide the decorative file icon from accessibility services * fix(search): address code-review findings on plugin search Fan-out, adapter, and plugin-API fixes from the ProjectSearchExtension review: - Guard plugin results against null elements (mapNotNull) and wrap the collection block in a logging try/catch so a bad element no longer kills the whole fan-out silently. (#1) - buildRows buffers each section's rows and emits the header only when a group exists, skipping blank titles -- no more orphan/blank headers suppressing the empty state. (#2) - Move the fan-out to lifecycleScope so a slow plugin can't pin a destroyed Activity/ViewModel or post to a dead Activity. (#3) - Keep the search progress indicator up when the built-in search is empty but plugins are enabled, so a plugin-only match doesn't flash a terminal "no results" state. (#4) - SearchListAdapter is now a ListAdapter + DiffUtil reused across emissions; the two-phase publish diffs instead of reallocating, preserving scroll and already-run highlights. (#5) - Collapse the adapter constructors to one clicks ctor plus a thin map convenience ctor; drop the dead keys param and nullable-value scrub. (#6) - Replace the blocking .get(10s) with a non-blocking withTimeoutOrNull + await so no commonPool worker is tied up. (#7) - Trim pipe-split filter tokens at the source (endsWith(" kt") matched nothing in built-in search too); align ProjectSearchExtension KDoc with actual behavior and drop the non-ASCII em-dash. (#9, #10) * style(search): expand when branches to block form for ktlint Spotless ratchets from origin/stage; stage was reformatted after this branch diverged, so CI flagged the single-expression when branches in onUpdateWadbConnectionStatus and the multi-line FileOpResult.Success branch. Expand them to ktlint's canonical block form so the file is fully canonical and passes under any ratchet base. * fix: reported violations for spotless
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.