Skip to content

test: add TemplateEditorScreen UI tests - #36

Merged
H2OKing89 merged 14 commits into
masterfrom
test/template-editor-screen-tests
Apr 18, 2026
Merged

H2OKing89 merged 14 commits into
masterfrom
test/template-editor-screen-tests

Conversation

@H2OKing89

@H2OKing89 H2OKing89 commented Mar 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds 22 Compose UI tests for TemplateEditorScreen, covering:

    • New template mode: title, button text, empty name, create button enable/disable
    • Edit template mode: title, prefilled name/tags, save button state
    • Core UI elements: name field, tags label, message label, back/cancel buttons
    • Tags: suggestion chips display, adding tags via suggestion click, prefilled tags
    • Placeholder chips: all 5 chips rendered, required hint displayed
    • Content editor dialog: open/close, placeholder chips inside dialog
    • Validation: blank name error, error clearing on input, missing placeholder error, save disabled on content error
    • Discard dialog: shown on cancel with changes, keep editing dismisses, no dialog without changes
    • Name max length: 50 character enforcement
  • Follows existing CustomerIntakeScreenTest patterns (CompositionLocals, fake dependencies, DataStore teardown)

Test plan

  • CI passes (compile, lint)
  • Instrumented tests pass on device/emulator (./gradlew connectedAndroidTest)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Added comprehensive instrumented tests for the template editor covering create/edit flows, validation, tag interactions, content editor dialog, and discard behavior.
  • Bug Fixes / UI

    • Template list warning now uses correct pluralization.
    • Error messaging in the template content editor displays correctly.
    • Status texts use the proper ellipsis character for cleaner display.
  • Chores

    • Bumped various platform and library versions for stability.

Covers new/edit mode rendering, name/content validation, tag suggestions,
placeholder chips, content editor dialog, discard changes dialog, and
max-length enforcement. 22 test cases following existing CustomerIntakeScreenTest
patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 6, 2026 •

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new comprehensive Android instrumented test suite for TemplateEditorScreen and multiple UI/clipboard/string/resource tweaks, plus dependency version bumps and small plumbing changes across install intent and protobuf configuration.

Changes

Cohort / File(s) Summary
Instrumented tests
app/src/androidTest/java/com/kingpaging/qwelcome/ui/templates/TemplateEditorScreenTest.kt
New Compose AndroidJUnit4 test class with ~29 tests covering new/edit flows, validation, tag interactions, content-editor dialog, discard dialog, and test setup helpers using FakeNavigator/FakeSoundPlayer and TemplateListViewModel.
Dependency catalog
gradle/libs.versions.toml
Bumped multiple versions: agp, coreKtx, activityCompose, kotlin, composeBom, datastorePreferences, kotlinxSerializationJson, protobuf, navigationCompose, firebaseBom.
Deprecation hints
app/src/main/java/.../ExportModels.kt
Added ReplaceWith("defaults.defaultTemplateId") on deprecated defaultTemplateId props and added @Suppress("DEPRECATION") around usages in getEffectiveDefaultTemplateId() to silence warnings.
Install intent change
app/src/main/java/.../GitHubAppUpdater.kt
Switched APK install intent action from Intent.ACTION_INSTALL_PACKAGE to Intent.ACTION_VIEW while keeping data/type and flags.
Clipboard API & async
app/src/main/java/.../TemplateVariablesSheet.kt, app/src/main/java/.../import_pkg/ImportScreen.kt
Replaced LocalClipboardManager.current with LocalClipboard.current; use getClipEntry()/setClipEntry(...) and perform clipboard reads/writes inside rememberCoroutineScope() (scope.launch).
Template editor minor
app/src/main/java/.../templates/TemplateEditorScreen.kt
Pass contentError directly into stringResource(...) instead of using a null→empty fallback.
Template list & strings
app/src/main/java/.../templates/TemplateListScreen.kt, app/src/main/res/values/strings.xml
Switched warning text to pluralStringResource(...); converted warning_template_limit to plurals. Replaced literal ... with escaped ellipsis &#8230; in several status strings.
Protobuf plugin config
proto/build.gradle.kts
Replaced libs.protobuf.protoc.get().toString() with explicit coordinate com.google.protobuf:protoc:${libs.versions.protobuf.get()} in plugin protoc configuration.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Veteran mecha engineer pre‑flight feedback (Issue → Impact → Fix → Test):

  • Issue: Clipboard calls converted to new API and moved to coroutine scope.
    Impact: Potential race conditions or missing clipboard entries if not awaited.
    Fix: Verify coroutine scope lifecycle aligns with composable lifecycle and handle null/empty clip entries defensively.
    Test: Exercise paste/copy flows in emulator and CI tests added (ImportScreen and TemplateVariablesSheet).
  • Issue: Install intent action changed to ACTION_VIEW.
    Impact: Different system handling across Android versions; may affect install flow or required flags.
    Fix: Confirm behavior across supported API levels and consider conditional action choice if needed.
    Test: Manual install flow verification on Android API matrix and add instrumentation if automatable.
  • Issue: Added ReplaceWith on deprecated fields and suppression on usages.
    Impact: Encourages migration but hides deprecation warnings at call sites.
    Fix: Gradually migrate callers to defaults.defaultTemplateId and remove suppressions once migrated.
    Test: Run static analysis and deprecation inspections; ensure no remaining runtime reliance on deprecated semantics.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: add TemplateEditorScreen UI tests' accurately describes the main changeset: a new test file with 22 UI test cases for TemplateEditorScreen.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/template-editor-screen-tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd5a62a7fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@app/src/androidTest/java/com/kingpaging/qwelcome/ui/templates/TemplateEditorScreenTest.kt`:
- Around line 96-101: The tests contradict:
newTemplate_createButtonDisabledWhenNameBlank() asserts the Create button is
disabled, but savingWithBlankName_showsNameError attempts to click Create when
name is blank; pick the disabled-by-design contract. Update
savingWithBlankName_showsNameError to use setScreenContentNewTemplate() (or the
same setup used by newTemplate_createButtonDisabledWhenNameBlank) and assert
composeRule.onNodeWithText(appContext.getString(R.string.action_create)).assertIsNotEnabled()
instead of performing a click, or if you need to exercise an error path, first
enter a name then clear it and then assert the disabled state/error flow
consistently across both tests (functions:
newTemplate_createButtonDisabledWhenNameBlank,
savingWithBlankName_showsNameError, setScreenContentNewTemplate).
- Around line 88-93: The test newTemplate_nameFieldIsEmpty currently only checks
the name label is displayed; update it to also assert the name input is empty by
locating the name input node (related to
appContext.getString(R.string.label_name) / the name input node used in
setScreenContentNewTemplate) and asserting its text/value is an empty string.
Similarly, update contentEditorDialog_showsMessageLabelAndDoneButton to assert
both the message label node (R.string.label_message or the dialog message node)
is displayed and that the Done button is visible; ensure you target the same
nodes the test uses (composeRule onNode... calls) and add explicit assertions
for the empty-field/value and message-label presence so the tests fail when
those states are incorrect.
- Around line 484-486: The test fixture creates a Template with a hardcoded id
("test-template-id"); replace that with a UUID-shaped id (either a fixed UUID
string or generated via UUID.randomUUID().toString()) in the existing-template
helper so the Template respects domain invariants used for conflict detection;
update the Template instantiation (the Template class usage in
TemplateEditorScreenTest / existing-template helper) to avoid special sentinel
ids like DEFAULT_TEMPLATE_ID ("default") or the new-template sentinel
("__new__") and re-run the edit/discard flows to ensure behavior is unchanged.
- Around line 4-17: The test file is missing imports for onNode() and
assertDoesNotExist(), causing unresolved references in TemplateEditorScreenTest;
add the two Compose testing imports for onNode and assertDoesNotExist (so calls
to onNode(...) and assertDoesNotExist() used in the test methods compile),
ensuring the import statements are placed with the other
androidx.compose.ui.test imports referenced by functions like createComposeRule,
onNodeWithText, performClick, and assertIsDisplayed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6cdccee7-a291-4c8b-b0eb-a8d25bda48f7

📥 Commits

Reviewing files that changed from the base of the PR and between ef402b1 and cd5a62a.

📒 Files selected for processing (1)
  • app/src/androidTest/java/com/kingpaging/qwelcome/ui/templates/TemplateEditorScreenTest.kt

Comment on lines +4 to +17
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.test.SemanticsMatcher
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.assertIsEnabled
import androidx.compose.ui.test.assertIsNotEnabled
import androidx.compose.ui.test.hasSetTextAction
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performTextClearance
import androidx.compose.ui.test.performTextInput
import androidx.test.core.app.ApplicationProvider

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="app/src/androidTest/java/com/kingpaging/qwelcome/ui/templates/TemplateEditorScreenTest.kt"

echo "== Checking file existence =="
if [ -f "$FILE" ]; then
  echo "✓ File exists"
  wc -l "$FILE"
else
  echo "✗ File does not exist at the specified path"
  exit 1
fi

echo -e "\n== Usages that require imports =="
rg -n '\bonNode\(|assertDoesNotExist\(' "$FILE" | head -20

echo -e "\n== Current imports section (lines 1-20) =="
head -20 "$FILE"

echo -e "\n== Checking for the specific missing imports =="
rg -n '^import androidx\.compose\.ui\.test\.(onNode|assertDoesNotExist)\b' "$FILE" || echo "No match found (imports are missing)"

Repository: H2OKing89/QWelcome

Length of output: 1893


Missing Compose test imports block androidTest compilation

  • Issue: onNode() and assertDoesNotExist() are called throughout the test but their imports are missing.
  • Impact: Compilation fails with unresolved references at lines 107, 269, 326, 331, 341, 365, 382, 398, 411, 461.
  • Fix: Add the two missing imports to the test class.
Patch
 import androidx.compose.ui.test.SemanticsMatcher
+import androidx.compose.ui.test.assertDoesNotExist
 import androidx.compose.ui.test.assertIsDisplayed
 import androidx.compose.ui.test.assertIsEnabled
 import androidx.compose.ui.test.assertIsNotEnabled
 import androidx.compose.ui.test.hasSetTextAction
 import androidx.compose.ui.test.hasText
 import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.compose.ui.test.onNode
 import androidx.compose.ui.test.onNodeWithContentDescription
 import androidx.compose.ui.test.onNodeWithText
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.test.SemanticsMatcher
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.assertIsEnabled
import androidx.compose.ui.test.assertIsNotEnabled
import androidx.compose.ui.test.hasSetTextAction
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performTextClearance
import androidx.compose.ui.test.performTextInput
import androidx.test.core.app.ApplicationProvider
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.test.SemanticsMatcher
import androidx.compose.ui.test.assertDoesNotExist
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.assertIsEnabled
import androidx.compose.ui.test.assertIsNotEnabled
import androidx.compose.ui.test.hasSetTextAction
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNode
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performTextClearance
import androidx.compose.ui.test.performTextInput
import androidx.test.core.app.ApplicationProvider
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@app/src/androidTest/java/com/kingpaging/qwelcome/ui/templates/TemplateEditorScreenTest.kt`
around lines 4 - 17, The test file is missing imports for onNode() and
assertDoesNotExist(), causing unresolved references in TemplateEditorScreenTest;
add the two Compose testing imports for onNode and assertDoesNotExist (so calls
to onNode(...) and assertDoesNotExist() used in the test methods compile),
ensuring the import statements are placed with the other
androidx.compose.ui.test imports referenced by functions like createComposeRule,
onNodeWithText, performClick, and assertIsDisplayed.

- Fix contradicting tests: savingWithBlankName and typingAfterNameError
  tried to click a disabled Create button (canSave requires non-blank
  name). Replaced with createButton_disabledAfterClearingName and
  createButton_reEnabledAfterRetypingName that test the enter/clear/
  retype flow consistently with the disabled-by-design contract.

- Strengthen newTemplate_nameFieldIsEmpty: now locates the editable
  field and asserts its text equals ["Name", ""] via assertTextEquals
  instead of only checking the label is displayed.

- Strengthen contentEditorDialog_showsMessageLabelAndDoneButton: now
  asserts both the Message label and Done button are displayed.

- Replace hardcoded "test-template-id" with UUID-shaped string in
  existing-template helper to respect domain invariants.

- Add assertTextEquals import (extension function needed for the new
  assertion). onNode and assertDoesNotExist are member functions in
  Compose BOM 2026.01.00 and do not require explicit imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@app/src/androidTest/java/com/kingpaging/qwelcome/ui/templates/TemplateEditorScreenTest.kt`:
- Around line 251-257: Extract the repeated "performClick() + waitForIdle()"
sequence into a private helper method named openContentEditorDialog() and call
it from clickingEditButton_opensContentEditorDialog and the other tests that
open the content editor; specifically, replace the
composeRule.onNodeWithContentDescription(appContext.getString(R.string.action_edit)).performClick()
followed by composeRule.waitForIdle() with a single call to
openContentEditorDialog(), implement the helper to locate the node via
composeRule.onNodeWithContentDescription(...) and performClick() then
waitForIdle(), and update all occurrences (including the other test methods that
currently repeat this sequence) to use the new helper to reduce duplication and
simplify future changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: fce62b25-bacd-4232-acdf-2e0f1bfed66c

📥 Commits

Reviewing files that changed from the base of the PR and between cd5a62a and aabc9da.

📒 Files selected for processing (1)
  • app/src/androidTest/java/com/kingpaging/qwelcome/ui/templates/TemplateEditorScreenTest.kt

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
gradle/libs.versions.toml (1)

1-77: 🧹 Nitpick | 🔵 Trivial

Scope observation: PR titled "add UI tests" but includes broad dependency bumps.

This file contains nine dependency version changes unrelated to adding TemplateEditorScreen tests. Consider:

  • Splitting dependency updates into a separate PR for cleaner bisect/rollback.
  • At minimum, call out the version bumps explicitly in the PR description so reviewers know to verify compatibility.

Not blocking, but worth noting for traceability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@gradle/libs.versions.toml` around lines 1 - 77, PR mixes unrelated dependency
version bumps with the "add UI tests" work; separate the changes by removing the
version updates from this branch (revert edits to keys such as lifecycle,
kotlin, composeBom, agp, protobuf, firebaseBom, coroutinesTest, mockk,
navigationCompose in gradle/libs.versions.toml) and create a separate PR
containing only those dependency bumps, or at minimum update this PR description
to explicitly list each bumped version (e.g., lifecycle="2.10.0",
kotlin="2.3.20", composeBom="2026.03.01", agp="9.1.0", protobuf="4.34.1",
firebaseBom="34.12.0", coroutinesTest="1.10.2", mockk="1.14.7",
navigationCompose="2.9.7") so reviewers can validate compatibility and you can
bisect/rollback independently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@gradle/libs.versions.toml`:
- Around line 1-77: PR mixes unrelated dependency version bumps with the "add UI
tests" work; separate the changes by removing the version updates from this
branch (revert edits to keys such as lifecycle, kotlin, composeBom, agp,
protobuf, firebaseBom, coroutinesTest, mockk, navigationCompose in
gradle/libs.versions.toml) and create a separate PR containing only those
dependency bumps, or at minimum update this PR description to explicitly list
each bumped version (e.g., lifecycle="2.10.0", kotlin="2.3.20",
composeBom="2026.03.01", agp="9.1.0", protobuf="4.34.1", firebaseBom="34.12.0",
coroutinesTest="1.10.2", mockk="1.14.7", navigationCompose="2.9.7") so reviewers
can validate compatibility and you can bisect/rollback independently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a837c417-2c07-4541-82fe-62d403a88241

📥 Commits

Reviewing files that changed from the base of the PR and between 37c837c and 8ca2ee7.

📒 Files selected for processing (1)
  • gradle/libs.versions.toml

coderabbitai[bot]
coderabbitai Bot previously requested changes Apr 18, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/main/java/com/kingpaging/qwelcome/data/GitHubAppUpdater.kt (1)

213-219: ⚠️ Potential issue | 🟠 Major

Add ACTION_VIEW query to manifest for APK installer resolution.

  • Issue: Code creates Intent.ACTION_VIEW with APK MIME type, but manifest <queries> declares only ACTION_INSTALL_PACKAGE and ACTION_SEND.
  • Impact: On Android 11+, resolveActivity() returns null (undeclared intent action), unconditionally blocking the install flow.
  • Fix: Add ACTION_VIEW intent query to AndroidManifest.xml:
Manifest update
 <queries>
     <intent>
         <action android:name="android.intent.action.INSTALL_PACKAGE" />
         <data android:scheme="content" />
     </intent>
+    <intent>
+        <action android:name="android.intent.action.VIEW" />
+        <data android:scheme="content" />
+        <data android:mimeType="application/vnd.android.package-archive" />
+    </intent>
     <intent>
         <action android:name="android.intent.action.SEND" />
         <data android:mimeType="text/plain" />
     </intent>
 </queries>
  • Test: On Android 11+ device, verify createInstallIntent() returns non-null when an APK installer is available.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/kingpaging/qwelcome/data/GitHubAppUpdater.kt` around
lines 213 - 219, The manifest currently only queries ACTION_INSTALL_PACKAGE and
ACTION_SEND, so resolveActivity() in createInstallIntent (the Intent built with
Intent.ACTION_VIEW and APK_MIME_TYPE) can return null on Android 11+; update
AndroidManifest.xml <queries> to include an <intent> entry that declares action
"android.intent.action.VIEW" and a matching <data> mimeType
"application/vnd.android.package-archive" so the APK installer can be resolved,
then rebuild and verify createInstallIntent() returns non-null when an installer
is present.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/main/java/com/kingpaging/qwelcome/data/ExportModels.kt`:
- Around line 177-180: Remove the redundant inner suppression inside
getEffectiveDefaultTemplateId(): keep the function-level
`@Suppress`("DEPRECATION") above fun getEffectiveDefaultTemplateId() and delete
the nested `@Suppress`("DEPRECATION") placed immediately before the return
statement so only the top-level suppression remains; locate the
getEffectiveDefaultTemplateId() method in ExportModels and remove the inner
annotation.

In `@app/src/main/java/com/kingpaging/qwelcome/ui/import_pkg/ImportScreen.kt`:
- Around line 204-216: The clipboard extraction can NPE because the code calls
it.clipData.getItemAt(0).text.toString(); update the paste handling around
clipboardManager.getClipEntry() to safely obtain text (e.g. use
it.clipData.getItemAt(0).coerceToText(context) or use safe-call
text?.toString()) and treat null/coerced-empty as a non-text clipboard: do not
call exceedsImportLimit/ vm.onPasteContent in that case and instead show the
empty-clipboard toast (or the existing R.string.toast_clipboard_empty), while
preserving the existing soundPlayer.playBeep() and import-size check paths
(exceedsImportLimit and vm.onPasteContent).

---

Outside diff comments:
In `@app/src/main/java/com/kingpaging/qwelcome/data/GitHubAppUpdater.kt`:
- Around line 213-219: The manifest currently only queries
ACTION_INSTALL_PACKAGE and ACTION_SEND, so resolveActivity() in
createInstallIntent (the Intent built with Intent.ACTION_VIEW and APK_MIME_TYPE)
can return null on Android 11+; update AndroidManifest.xml <queries> to include
an <intent> entry that declares action "android.intent.action.VIEW" and a
matching <data> mimeType "application/vnd.android.package-archive" so the APK
installer can be resolved, then rebuild and verify createInstallIntent() returns
non-null when an installer is present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 02e7417e-ecb4-4d69-8bbb-980f70d3add1

📥 Commits

Reviewing files that changed from the base of the PR and between 8ca2ee7 and 0d48d0b.

📒 Files selected for processing (9)
  • app/src/main/java/com/kingpaging/qwelcome/data/ExportModels.kt
  • app/src/main/java/com/kingpaging/qwelcome/data/GitHubAppUpdater.kt
  • app/src/main/java/com/kingpaging/qwelcome/ui/components/TemplateVariablesSheet.kt
  • app/src/main/java/com/kingpaging/qwelcome/ui/import_pkg/ImportScreen.kt
  • app/src/main/java/com/kingpaging/qwelcome/ui/templates/TemplateEditorScreen.kt
  • app/src/main/java/com/kingpaging/qwelcome/ui/templates/TemplateListScreen.kt
  • app/src/main/res/values/strings.xml
  • gradle/libs.versions.toml
  • proto/build.gradle.kts

@H2OKing89
H2OKing89 merged commit a2f46ff into master Apr 18, 2026
3 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Apr 19, 2026
11 of 12 tasks
@H2OKing89
H2OKing89 deleted the test/template-editor-screen-tests branch August 9, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant