refactor: ui-module full cliclack consolidation + auth.rs final sweep - #252
Conversation
📝 WalkthroughWalkthroughThe PR adds shared CLI branding and an ChangesCLI branding and command experience
Tauri mobile research
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant AboutCommand
participant Banner
CLI->>AboutCommand: dispatch about or default command
AboutCommand->>Banner: print_banner()
Banner-->>CLI: render branding and version guidance
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 10
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/cli/channel.rs (1)
34-38: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMissed
eprintln!migration in the same function.The "unknown platform" error at lines 35-37 still uses
eprintln!while the database-open andsend_messageerror paths below (lines 43-50) were migrated tocrate::ui::error. For consistency with the PR's output consolidation objective, this should also usecrate::ui::error.Proposed fix
let Some(platform) = crate::channels::Platform::parse(&to) else { - eprintln!( - "error: unknown platform '{to}' (expected telegram, slack, or discord)" + crate::ui::error(&format!( + "unknown platform '{to}' (expected telegram, slack, or discord)" ); std::process::exit(1); };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/cli/channel.rs` around lines 34 - 38, In the channel command’s platform-parsing branch, replace the unknown-platform eprintln! with crate::ui::error, matching the existing database-open and send_message error paths in the same function. Preserve the current message content and exit behavior.
🧹 Nitpick comments (1)
TAURI_MOBILE_RESEARCH.md (1)
29-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCall
platform()synchronously.The Tauri OS plugin returns a string directly;
awaitis unnecessary and misrepresents the API contract. (v2.tauri.app)Proposed correction
- const os = await platform() + const os = platform()🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@TAURI_MOBILE_RESEARCH.md` around lines 29 - 32, Update the platform usage example in TAURI_MOBILE_RESEARCH.md to call platform() synchronously and assign its returned string directly, removing await while preserving the existing import and documented platform values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@install.sh`:
- Line 24: Update the CY, MG, and RS color assignments in install.sh to use
POSIX-compatible escape handling instead of Bash-only $'...' syntax, while
preserving the existing color values and /bin/sh compatibility.
In `@src/agents.rs`:
- Around line 156-181: Centralize severity labels in crate::ui::error by passing
bare messages instead of caller-added error: or Error: prefixes. Update the
error branches in src/agents.rs (cli_install/update/uninstall/launch and the
specified launch-environment/headless paths), src/alias.rs, src/auth_runner.rs,
src/cli/handoff.rs, src/cli/memory.rs, and src/dev_install/mod.rs at the listed
ranges; preserve each underlying error message and remove only the redundant
caller-owned label.
In `@src/artifacts.rs`:
- Around line 10-13: Remove the leading spaces from the store message passed to
ui::info in the artifacts server startup flow, keeping the existing
dir.display() content and formatting otherwise unchanged.
In `@src/cli/gateway.rs`:
- Around line 52-56: Update the secret input handling in the surrounding gateway
flow to preserve the supplied value for encryption and set_secret, removing only
transport newline characters. Use a separate value.trim().is_empty() check to
reject whitespace-only input without altering leading or trailing spaces in
valid secrets.
In `@src/coaching/cli.rs`:
- Line 54: Update the success branch of cli_apply to use crate::ui::success
instead of println!, matching cli_remove’s success output while preserving the
existing rule.id and rule.title message.
In `@TAURI_MOBILE_RESEARCH.md`:
- Around line 105-107: The CSP example in the security configuration is overly
permissive. Update the security CSP documentation to remove wildcard network
sources and unsafe script/style directives, replacing them with only the exact
trusted endpoints and source directives required by the sample; do not present
the result as a hardened baseline unless it is restrictive.
- Around line 34-37: Update the “Tauri hooks” bullet in TAURI_MOBILE_RESEARCH.md
to replace the invalid `plugin-device` reference with the actual installable
Tauri v2 device-information plugin package name, such as
`tauri-plugin-device-info`; keep the existing Window, shell/deep-link, and
notification references unchanged.
- Around line 114-129: Update the Android capability configuration to add the
http:default permission alongside the existing permissions, and remove the
generic plugins.http.scope and plugins.websocket.scope entries from the
configuration example. Keep the websocket capability permission and other
settings unchanged.
- Around line 153-154: Update the Android signing guidance in
TAURI_MOBILE_RESEARCH.md to use src-tauri/gen/android/keystore.properties with
Gradle signingConfigs, rather than tauri.conf.json bundle.android settings.
Instruct developers to keep keystore credentials out of source control and
ensure release APK/AAB artifacts are signed before distribution.
- Around line 18-19: Update the iOS minimum version from 9+ to 14.0 in both
referenced ranges of TAURI_MOBILE_RESEARCH.md: the platform requirements entry
at lines 18-19 and the HuLa row at lines 43-44. Keep the surrounding platform
and WebView information unchanged.
---
Outside diff comments:
In `@src/cli/channel.rs`:
- Around line 34-38: In the channel command’s platform-parsing branch, replace
the unknown-platform eprintln! with crate::ui::error, matching the existing
database-open and send_message error paths in the same function. Preserve the
current message content and exit behavior.
---
Nitpick comments:
In `@TAURI_MOBILE_RESEARCH.md`:
- Around line 29-32: Update the platform usage example in
TAURI_MOBILE_RESEARCH.md to call platform() synchronously and assign its
returned string directly, removing await while preserving the existing import
and documented platform values.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: fe45ca32-b989-40ca-9bba-e0169bd25085
📒 Files selected for processing (28)
README.mdTAURI_MOBILE_RESEARCH.mdassets/banner.txtinstall.ps1install.shsrc/about.rssrc/agents.rssrc/alias.rssrc/artifacts.rssrc/auth.rssrc/auth_crypt.rssrc/auth_runner.rssrc/banner.rssrc/cli/channel.rssrc/cli/claim.rssrc/cli/gateway.rssrc/cli/git.rssrc/cli/handoff.rssrc/cli/mcp.rssrc/cli/memory.rssrc/cli/mod.rssrc/cli/review.rssrc/coaching/cli.rssrc/dev_install/mod.rssrc/github/init_auth.rssrc/main.rssrc/ui/mod.rssrc/ui/prompt.rs
| # Suppress for non-interactive, NO_COLOR, or quiet install. | ||
| case "${AGENTFLARE_QUIET_INSTALL:-}" in 1|true) return 0 ;; esac | ||
| if [ -t 1 ] && [ -z "${NO_COLOR+x}" ]; then | ||
| CY=$'\033[2;36m'; MG=$'\033[1;35m'; RS=$'\033[0m' |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the shebang of install.sh to determine shell compatibility
head -1 install.shRepository: getappz/agentflare
Length of output: 166
🏁 Script executed:
sed -n '1,40p' install.sh | cat -nRepository: getappz/agentflare
Length of output: 2227
install.sh needs POSIX-compatible color escapes. The $'...' assignments are Bash-only, but this script runs under #!/bin/sh, so the installer breaks on dash-based systems. Replace them with POSIX-safe escapes or printf.
🧰 Tools
🪛 Shellcheck (0.11.0)
[warning] 24-24: In POSIX sh, $'..' is undefined.
(SC3003)
[warning] 24-24: In POSIX sh, $'..' is undefined.
(SC3003)
[warning] 24-24: In POSIX sh, $'..' is undefined.
(SC3003)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@install.sh` at line 24, Update the CY, MG, and RS color assignments in
install.sh to use POSIX-compatible escape handling instead of Bash-only $'...'
syntax, while preserving the existing color values and /bin/sh compatibility.
| let value = value.trim(); | ||
| if value.is_empty() { | ||
| eprintln!("secret value must not be empty"); | ||
| crate::ui::error("secret value must not be empty"); | ||
| std::process::exit(1); | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Preserve the supplied secret value.
trim() removes leading/trailing spaces and tabs before encryption, so a valid passphrase or credential is stored differently from the stdin value. Strip only the transport newline(s), and use a separate trimmed check for rejecting whitespace-only input.
Proposed fix
- let value = value.trim();
+ let value = value.trim_end_matches(&['\r', '\n'][..]);
if value.is_empty() {If whitespace-only values must remain invalid, check value.trim().is_empty() without changing the value passed to set_secret.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/cli/gateway.rs` around lines 52 - 56, Update the secret input handling in
the surrounding gateway flow to preserve the supplied value for encryption and
set_secret, removing only transport newline characters. Use a separate
value.trim().is_empty() check to reject whitespace-only input without altering
leading or trailing spaces in valid secrets.
| @@ -53,17 +53,17 @@ pub fn cli_apply( | |||
| match store::apply_rule(id, title, body, trigger) { | |||
| Ok(rule) => println!("Applied coaching rule '{}': {}", rule.id, rule.title), | |||
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Inconsistent success output: cli_apply still uses println! while cli_remove uses crate::ui::success.
Line 54 reports a successful apply via println!, but the PR migrated cli_remove's success path (line 64) to crate::ui::success. For consistency, the apply success should also route through crate::ui::success.
Proposed fix
- Ok(rule) => println!("Applied coaching rule '{}': {}", rule.id, rule.title),
+ Ok(rule) => crate::ui::success(&format!("Applied coaching rule '{}': {}", rule.id, rule.title)),📝 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.
| Ok(rule) => println!("Applied coaching rule '{}': {}", rule.id, rule.title), | |
| Ok(rule) => crate::ui::success(&format!("Applied coaching rule '{}': {}", rule.id, rule.title)), |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/coaching/cli.rs` at line 54, Update the success branch of cli_apply to
use crate::ui::success instead of println!, matching cli_remove’s success output
while preserving the existing rule.id and rule.title message.
| - iOS/iPadOS: 9+ (iPad supported) | ||
| - WebView: system Android System WebView / iOS WKWebView |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== File list ==\n'
git ls-files TAURI_MOBILE_RESEARCH.md
printf '\n== Relevant lines ==\n'
nl -ba TAURI_MOBILE_RESEARCH.md | sed -n '1,120p'Repository: getappz/agentflare
Length of output: 260
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json, urllib.request, re, sys
urls = [
"https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-schema-generator/schemas/config.schema.json",
]
for url in urls:
print(f"== {url} ==")
try:
with urllib.request.urlopen(url, timeout=20) as resp:
data = resp.read().decode("utf-8", "replace")
# look for iOS deployment target / minimum version hints
for pat in [r'ios.*deployment', r'deploymentTarget', r'minimum.*ios', r'iOS.*[0-9]+\+']:
m = re.search(pat, data, re.I)
if m:
start = max(0, m.start() - 200)
end = min(len(data), m.end() + 400)
print(data[start:end])
break
else:
print("No obvious iOS deployment target string found")
except Exception as e:
print("ERR:", e)
PYRepository: getappz/agentflare
Length of output: 413
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import urllib.request, re, json
# Search Tauri docs / schema references that mention iOS deployment target.
queries = [
"site:tauri.app iOS deployment target Tauri v2",
"site:github.com/tauri-apps/tauri iOS deployment target config schema",
]
print("No-op placeholder; please provide web_search results if available.")
PYRepository: getappz/agentflare
Length of output: 223
🌐 Web query:
Tauri v2 iOS deployment target minimum version config.schema.json
💡 Result:
In Tauri v2, you can configure the minimum iOS deployment target using the bundle.iOS.minimumSystemVersion setting in your tauri.conf.json file [1][2]. Configuration Details: - Path: bundle > iOS > minimumSystemVersion [1][2] - Type: string [1] - Purpose: Maps to the IPHONEOS_DEPLOYMENT_TARGET value for your iOS build [1][2]. - Default: While early versions defaulted to 13.0 [2][3], recent updates have moved this default to 14.0 [1][4]. Example usage in tauri.conf.json: { "bundle": { "iOS": { "minimumSystemVersion": "15.0" } } } This setting ensures your application correctly specifies its minimum supported iOS version during the build process [1][2]. If you are using platform-specific configuration files, you can also place this setting within tauri.ios.conf.json [5][6].
Citations:
- 1: https://v2.tauri.app/reference/config/
- 2: https://www.github.com/tauri-apps/tauri/commit/02c00abc63cf86e9bf9179cbb143d5145a9397b6
- 3: https://fossies.org/diffs/tauri/v2.10.3_vs_v2.11.0/crates/tauri-cli/tauri.config.schema.json-diff.html
- 4: feat(cli): increase iOS deployment target to 14.0 tauri-apps/tauri#13997
- 5: https://schema.tauri.app/config/2
- 6: https://v2.tauri.app/develop/configuration-files/
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '== TAURI_MOBILE_RESEARCH.md excerpt ==\n'
sed -n '1,120p' TAURI_MOBILE_RESEARCH.md | cat -nRepository: getappz/agentflare
Length of output: 5670
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,120p' TAURI_MOBILE_RESEARCH.md | cat -nRepository: getappz/agentflare
Length of output: 5631
Align the iOS minimum with Tauri v2
TAURI_MOBILE_RESEARCH.md#L18-L19 and the HuLa row at #L43-L44 still say iOS 9+, but Tauri v2’s iOS floor is 14.0. Update both spots so the guide doesn’t point readers to an obsolete target.
📍 Affects 1 file
TAURI_MOBILE_RESEARCH.md#L18-L19(this comment)TAURI_MOBILE_RESEARCH.md#L43-L44
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@TAURI_MOBILE_RESEARCH.md` around lines 18 - 19, Update the iOS minimum
version from 9+ to 14.0 in both referenced ranges of TAURI_MOBILE_RESEARCH.md:
the platform requirements entry at lines 18-19 and the HuLa row at lines 43-44.
Keep the surrounding platform and WebView information unchanged.
| - **Native feel**: `env(safe-area-inset-*)` for notches/gesture bars; ≥44px touch | ||
| targets; momentum scroll; swipe/gesture handlers. | ||
| - **Tauri hooks**: `plugin-device` (screen size, DPR), `Window` API (resize, | ||
| fullscreen, safe-area), `plugin-shell` / deep links, notifications. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== File excerpt ==\n'
nl -ba TAURI_MOBILE_RESEARCH.md | sed -n '28,42p'
printf '\n== Repo search for plugin-device ==\n'
rg -n --hidden --no-ignore-vcs 'plugin-device|device-info|tauri-plugin-device' .
printf '\n== File inventory for related docs ==\n'
git ls-files | rg 'TAURI_MOBILE_RESEARCH\.md|tauri|plugin'Repository: getappz/agentflare
Length of output: 216
🌐 Web query:
Tauri v2 plugin device info official plugin ecosystem tauri-plugin-device-info plugins workspace
💡 Result:
There is no official Tauri v2 plugin named tauri-plugin-device-info within the official tauri-apps/plugins-workspace repository [1][2][3]. The official workspace contains plugins such as os, which provides basic operating system information (e.g., platform, version, arch) [1][4]. The tauri-plugin-device-info crate is a community-maintained, third-party plugin [5][6]. It provides a comprehensive, cross-platform API for accessing detailed device information, including battery status, network details, storage statistics, display information, and hardware identifiers across Windows, macOS, Linux, iOS, and Android [5][6][7]. For projects requiring deeper device or hardware metrics beyond what the official os plugin offers, you can integrate this third-party plugin using the standard Tauri plugin installation process [5][7]: 1. Installation: Use the Tauri CLI to add the plugin to your project: npm run tauri add device-info [5][7] 2. Configuration: Initialize the plugin in your Rust code (main.rs or lib.rs):.plugin(tauri_plugin_device_info::init) [6][7] 3. Usage: Access the API in your frontend via the tauri-plugin-device-info-api package [6][7]. Always verify third-party dependencies before integrating them into production environments. You can review the plugin's source code and documentation via its GitHub repository [5] or on crates.io [7].
Citations:
- 1: https://github.com/tauri-apps/plugins-workspace/blob/v2/README.md
- 2: https://github.com/tauri-apps/plugins-workspace
- 3: https://github.com/tauri-apps/plugins-workspace/tree/refs/heads/v2
- 4: https://v2.tauri.app/plugin/os-info/
- 5: https://github.com/edisdev/tauri-plugin-device-info
- 6: https://docs.rs/tauri-plugin-device-info
- 7: https://crates.io/crates/tauri-plugin-device-info
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== File excerpt ==\n'
awk 'NR>=28 && NR<=42 { printf "%4d %s\n", NR, $0 }' TAURI_MOBILE_RESEARCH.md
printf '\n== Related references in repo ==\n'
rg -n --hidden --no-ignore-vcs 'plugin-device|device-info|plugin-os|os info|Window API|plugin-shell' TAURI_MOBILE_RESEARCH.md .Repository: getappz/agentflare
Length of output: 1617
Name the actual device-info plugin or remove this bullet. plugin-device isn’t a Tauri v2 plugin name; use the real package name (for example tauri-plugin-device-info) so readers can install the right dependency.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@TAURI_MOBILE_RESEARCH.md` around lines 34 - 37, Update the “Tauri hooks”
bullet in TAURI_MOBILE_RESEARCH.md to replace the invalid `plugin-device`
reference with the actual installable Tauri v2 device-information plugin package
name, such as `tauri-plugin-device-info`; keep the existing Window,
shell/deep-link, and notification references unchanged.
| "security": { | ||
| "csp": "default-src 'self'; connect-src 'self' https://api.github.com wss://*; img-src 'self' data: https://*; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" | ||
| } |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Do not present this CSP as a hardened copy-paste baseline.
https://*, wss://*, 'unsafe-eval', and 'unsafe-inline' substantially widen the attack surface. Tauri recommends allowing only trusted, required hosts and sources; replace these wildcards with the exact endpoints the sample needs. (v2.tauri.app)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@TAURI_MOBILE_RESEARCH.md` around lines 105 - 107, The CSP example in the
security configuration is overly permissive. Update the security CSP
documentation to remove wildcard network sources and unsafe script/style
directives, replacing them with only the exact trusted endpoints and source
directives required by the sample; do not present the result as a hardened
baseline unless it is restrictive.
| "plugins": { | ||
| "http": { "scope": ["https://api.github.com", "https://github.com", "wss://*"] }, | ||
| "websocket": { "scope": ["wss://*.github.dev", "wss://api.github.com"] }, | ||
| "store": { "path": "store.bin" } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### `src-tauri/capabilities/android.json` | ||
| ```json | ||
| { | ||
| "identifier": "android-capability", | ||
| "description": "Capability for Android platform", | ||
| "windows": ["main"], | ||
| "permissions": ["core:default", "fs:allow-read-text-file", "websocket:default"], | ||
| "platforms": ["android"] |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate the referenced doc and related Tauri config files
git ls-files | rg '(^|/)(TAURI_MOBILE_RESEARCH\.md|tauri\.conf(\.[jt]s|\.json)?|android\.json|capabilities/.*\.json)$'
# Show the relevant section of TAURI_MOBILE_RESEARCH.md
if git ls-files --error-unmatch TAURI_MOBILE_RESEARCH.md >/dev/null 2>&1; then
echo '--- TAURI_MOBILE_RESEARCH.md (around lines 100-140) ---'
sed -n '100,140p' TAURI_MOBILE_RESEARCH.md
fi
# Show any capability files mentioning http/websocket/store
echo '--- capability files mentioning http/websocket/store ---'
for f in $(git ls-files | rg 'capabilities/.*\.json$'); do
if rg -n '"(http|websocket|store)"|http:default|websocket:default|fs:allow-read-text-file' "$f" >/dev/null; then
echo "### $f"
rg -n '"(http|websocket|store)"|http:default|websocket:default|fs:allow-read-text-file' "$f"
fi
done
# Show any tauri config files mentioning plugins/http/websocket/store
echo '--- tauri config files mentioning plugins/http/websocket/store ---'
for f in $(git ls-files | rg 'tauri\.conf(\.[jt]s|\.json)?$|TAURI_MOBILE_RESEARCH\.md$'); do
if rg -n '"plugins"|http\.scope|websocket\.scope|store\.bin|http:default|websocket:default' "$f" >/dev/null; then
echo "### $f"
rg -n '"plugins"|http\.scope|websocket\.scope|store\.bin|http:default|websocket:default' "$f"
fi
doneRepository: getappz/agentflare
Length of output: 1952
🌐 Web query:
Tauri v2 http plugin scope capabilities permission entries android json websocket scope docs
💡 Result:
In Tauri v2, managing plugin access is handled through a system of Capabilities and Permissions defined in your src-tauri directory [1][2]. This system is platform-agnostic, meaning the same configuration structure applies to Android as it does to desktop platforms [2]. HTTP and WebSocket Scope Configuration The HTTP and WebSocket plugins use scopes to restrict which URLs can be accessed [3][4][5]. You configure these within your capability files (JSON or TOML) by defining an allow or deny list using glob patterns [4][2][6]. Example HTTP Scope Configuration To restrict HTTP access to specific domains, define a permission entry in a capability file (e.g., src-tauri/capabilities/default.json) [3][7]: { "permissions": [ { "identifier": "http:default", "allow": [{ "url": "https://.tauri.app" }], "deny": [{ "url": "https://private.tauri.app" }] } ] } If you attempt to execute a fetch request to a URL not covered by your allow scope, the request will be rejected [4]. WebSocket Configuration Similarly, the WebSocket plugin requires explicit permission in your capabilities to enable connectivity [5]. Because WebSocket scopes are plugin-specific, you must ensure your capability includes the necessary plugin permissions [5][6]: { "identifier": "main-capability", "windows": ["main"], "permissions": ["websocket:default"] } Platform-Specific Capabilities If you need to limit these permissions specifically to Android, you can use the platforms field within your capability definition [2][8]: { "identifier": "android-http-capability", "platforms": ["android"], "permissions": [ { "identifier": "http:default", "allow": [{ "url": "https://api.example.com/" }] } ] } Key Concepts: - Capabilities: Files located in src-tauri/capabilities/ that group permissions and assign them to windows or webviews [2][8]. - Permissions: Define which commands are enabled and apply granular scope restrictions [1][9]. - Scopes: Granular filters (like URL patterns for HTTP or WebSocket) passed to commands and enforced by the plugin implementation [4][6][9]. - Android: There is no special Android-only JSON format; the standard Tauri ACL (Access Control List) system is used across all supported platforms [2][8].
Citations:
- 1: https://v2.tauri.app/security/permissions/
- 2: https://v2.tauri.app/security/capabilities/
- 3: https://v2.tauri.app/plugin/http-client/
- 4: https://v2.tauri.app/reference/javascript/http/
- 5: https://v2.tauri.app/plugin/websocket/
- 6: https://v2.tauri.app/security/scope/
- 7: https://github.com/tauri-apps/tauri-docs/blob/v2/src/content/docs/plugin/http-client.mdx
- 8: https://v2.tauri.app/reference/acl/capability/
- 9: https://v2.tauri.app/reference/acl/permission/
Move the URL allowlists into capability permissions. Tauri v2 keeps HTTP/WebSocket scopes in capability permission entries, not under plugins.http.scope or plugins.websocket.scope. Add http:default to src-tauri/capabilities/android.json and remove the generic plugin scope block from the example.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@TAURI_MOBILE_RESEARCH.md` around lines 114 - 129, Update the Android
capability configuration to add the http:default permission alongside the
existing permissions, and remove the generic plugins.http.scope and
plugins.websocket.scope entries from the configuration example. Keep the
websocket capability permission and other settings unchanged.
| Android signing is configured in `tauri.conf.json` (`bundle.android.*`) or via | ||
| `src-tauri/gen/android/gradle.properties` + `build.gradle.kts` signingConfigs. |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- TAURI_MOBILE_RESEARCH.md excerpt ---'
nl -ba TAURI_MOBILE_RESEARCH.md | sed -n '145,165p'
echo
echo '--- search for Android signing references in repo ---'
python3 - <<'PY'
import os
from pathlib import Path
targets = []
for p in Path('.').rglob('*'):
if p.is_file() and p.suffix in {'.md', '.json', '.json5', '.toml', '.ts', '.js', '.kts', '.kt', '.rs', '.yml', '.yaml'}:
try:
text = p.read_text(errors='ignore')
except Exception:
continue
if any(k in text for k in ['keystore.properties', 'signingConfigs', 'bundle.android', 'android.signing', 'signing']):
targets.append(str(p))
for p in targets[:200]:
print(p)
PYRepository: getappz/agentflare
Length of output: 237
🏁 Script executed:
python3 - <<'PY'
from pathlib import Path
path = Path("TAURI_MOBILE_RESEARCH.md")
text = path.read_text(errors="ignore").splitlines()
for i in range(145, 166):
if 1 <= i <= len(text):
print(f"{i:4d}: {text[i-1]}")
PYRepository: getappz/agentflare
Length of output: 1174
🌐 Web query:
Tauri Android signing keystore.properties signingConfigs bundle.android tauri.conf.json official docs
💡 Result:
To configure Android signing for a Tauri application, you do not use tauri.conf.json directly for keystore credentials; instead, you configure the native Android Gradle project generated by Tauri [1][2]. Tauri's official documentation provides a standard approach using a keystore.properties file and Gradle signingConfigs [1][2]. 1. Create a keystore.properties File In your project directory, create a file named src-tauri/gen/android/keystore.properties. This file should contain the necessary information to access your Java Keystore (JKS) [1][2]: password= keyAlias= storeFile= Note: For CI/CD pipelines, these values are typically injected via environment variables rather than stored in a plaintext file [1][2][3]. 2. Configure Gradle (build.gradle.kts) Edit the file at src-tauri/gen/android/app/build.gradle.kts to load these properties and configure the release signing config [1][2]. Add the signingConfigs block before the buildTypes block: signingConfigs { create("release") { val keystorePropertiesFile = rootProject.file("keystore.properties") val keystoreProperties = Properties if (keystorePropertiesFile.exists) { keystoreProperties.load(FileInputStream(keystorePropertiesFile)) } keyAlias = keystoreProperties["keyAlias"] as String keyPassword = keystoreProperties["password"] as String storeFile = file(keystoreProperties["storeFile"] as String) storePassword = keystoreProperties["password"] as String } } Then, apply this configuration in the buildTypes block: buildTypes { getByName("release") { signingConfig = signingConfigs.getByName("release") } } Tauri configuration files (tauri.conf.json or tauri.android.conf.json) are primarily used for application metadata, window settings, and other bundle configurations, but they do not manage the native Android keystore signing process [4][5]. Always refer to the official Tauri Android signing documentation for the most accurate, up-to-date implementation details [2].
Citations:
- 1: https://github.com/tauri-apps/tauri-docs/blob/v2/src/content/docs/distribute/Sign/android.mdx
- 2: https://v2.tauri.app/distribute/sign/android/
- 3: feat(cli): setup Android signing tauri-apps/tauri#9964
- 4: https://v2.tauri.app/develop/configuration-files/
- 5: https://v2.tauri.app/reference/config/
Fix the Android signing workflow. Tauri’s Android docs use src-tauri/gen/android/keystore.properties plus Gradle signingConfigs; tauri.conf.json’s bundle.android.* doesn’t configure the signing key. Keep the keystore out of source control and sign release APK/AAB artifacts before distribution.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@TAURI_MOBILE_RESEARCH.md` around lines 153 - 154, Update the Android signing
guidance in TAURI_MOBILE_RESEARCH.md to use
src-tauri/gen/android/keystore.properties with Gradle signingConfigs, rather
than tauri.conf.json bundle.android settings. Instruct developers to keep
keystore credentials out of source control and ensure release APK/AAB artifacts
are signed before distribution.
Summary
Routes all terminal-visible output through
crate::ui(cliclack-backed). Completes the P1 sweep started alongside the branding PR (#247).Changes
src/auth.rs(~30 sites) — last remaining P1 file. Everyeprintln!error/warning →crate::ui::error/warning.src/auth_crypt.rs— password prompt →crate::ui::password.src/github/init_auth.rs— full consolidation (password + error/status).alias,agents,artifacts,auth_runner,cli/{channel,claim,gateway,git,handoff,mcp,memory,review},coaching/cli,dev_install/mod.src/ui/prompt.rs— newpassword()helper.src/ui/mod.rs—passwordre-export.Verification
cargo checkclean (2 pre-existing warnings unrelated).Summary by CodeRabbit
New Features
aboutcommand (alias:logo) with version, branding, and getting-started guidance.Documentation
Style / UX Improvements
Tests