Skip to content

refactor: ui-module full cliclack consolidation + auth.rs final sweep - #252

Merged
getappz merged 4 commits into
masterfrom
ui-module-consolidation
Jul 18, 2026
Merged

refactor: ui-module full cliclack consolidation + auth.rs final sweep#252
getappz merged 4 commits into
masterfrom
ui-module-consolidation

Conversation

@getappz

@getappz getappz commented Jul 18, 2026

Copy link
Copy Markdown
Owner

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. Every eprintln! 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).
  • P1 files consolidatedalias, agents, artifacts, auth_runner, cli/{channel,claim,gateway,git,handoff,mcp,memory,review}, coaching/cli, dev_install/mod.
  • src/ui/prompt.rs — new password() helper.
  • src/ui/mod.rspassword re-export.

Verification

  • cargo check clean (2 pre-existing warnings unrelated).
  • All human-facing output now goes through cliclack (interactive) or fallback (non-interactive).

Summary by CodeRabbit

  • New Features

    • Added an about command (alias: logo) with version, branding, and getting-started guidance.
    • Running the CLI without a command now shows the introductory information.
    • Installers now display a branded banner in interactive/non-quiet contexts.
  • Documentation

    • Added mobile/tablet Tauri development guide.
    • Updated the README with a centered introductory banner.
  • Style / UX Improvements

    • Standardized CLI messaging (errors, warnings, info, success) across commands.
    • Improved secure credential entry with a new password prompt helper.
  • Tests

    • Added a unit test for banner newline handling.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds shared CLI branding and an about command, centralizes user-facing output and password prompts through crate::ui, updates installers and README presentation, and adds a Tauri v2 mobile research guide with configuration and build examples.

Changes

CLI branding and command experience

Layer / File(s) Summary
Branding and about command
assets/banner.txt, src/banner.rs, src/about.rs, src/main.rs, src/cli/mod.rs, install.*, README.md
Adds the shared banner, colored rendering, installer output, README banner, and about/logo command with default dispatch when no command is provided.
Centralized prompts and authentication interaction
src/ui/*, src/auth_crypt.rs, src/github/init_auth.rs
Adds the UI password helper and uses centralized prompt, success, warning, and error handling for vault and GitHub authentication flows.
Authentication and agent output routing
src/agents.rs, src/alias.rs, src/artifacts.rs, src/auth.rs, src/auth_runner.rs
Replaces direct stderr reporting in agent, alias, artifact, authentication, and retry paths with centralized UI helpers.
Command output standardization
src/cli/*, src/coaching/cli.rs, src/dev_install/mod.rs
Routes command errors and successes through crate::ui while preserving existing exits and installation control flow.

Tauri mobile research

Layer / File(s) Summary
Mobile research and configuration guide
TAURI_MOBILE_RESEARCH.md
Documents Tauri v2 mobile support, responsive UI adaptation, reference projects, configuration and capability examples, build/signing commands, recommendations, and sources.

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
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 46.81% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the PR’s main theme: consolidating UI output and finishing the auth.rs sweep.
Description check ✅ Passed The description covers the summary and verification, but it omits the template’s Test plan and Notes for reviewers sections.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ui-module-consolidation

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

@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: 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 win

Missed eprintln! migration in the same function.

The "unknown platform" error at lines 35-37 still uses eprintln! while the database-open and send_message error paths below (lines 43-50) were migrated to crate::ui::error. For consistency with the PR's output consolidation objective, this should also use crate::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 win

Call platform() synchronously.

The Tauri OS plugin returns a string directly; await is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9987395 and 563eeb5.

📒 Files selected for processing (28)
  • README.md
  • TAURI_MOBILE_RESEARCH.md
  • assets/banner.txt
  • install.ps1
  • install.sh
  • src/about.rs
  • src/agents.rs
  • src/alias.rs
  • src/artifacts.rs
  • src/auth.rs
  • src/auth_crypt.rs
  • src/auth_runner.rs
  • src/banner.rs
  • src/cli/channel.rs
  • src/cli/claim.rs
  • src/cli/gateway.rs
  • src/cli/git.rs
  • src/cli/handoff.rs
  • src/cli/mcp.rs
  • src/cli/memory.rs
  • src/cli/mod.rs
  • src/cli/review.rs
  • src/coaching/cli.rs
  • src/dev_install/mod.rs
  • src/github/init_auth.rs
  • src/main.rs
  • src/ui/mod.rs
  • src/ui/prompt.rs

Comment thread install.sh
# 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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check the shebang of install.sh to determine shell compatibility
head -1 install.sh

Repository: getappz/agentflare

Length of output: 166


🏁 Script executed:

sed -n '1,40p' install.sh | cat -n

Repository: 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.

Comment thread src/agents.rs Outdated
Comment thread src/artifacts.rs Outdated
Comment thread src/cli/gateway.rs
Comment on lines 52 to 56
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);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ 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.

Comment thread src/coaching/cli.rs
@@ -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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Suggested change
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.

Comment thread TAURI_MOBILE_RESEARCH.md
Comment on lines +18 to +19
- iOS/iPadOS: 9+ (iPad supported)
- WebView: system Android System WebView / iOS WKWebView

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 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)
PY

Repository: 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.")
PY

Repository: 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:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== TAURI_MOBILE_RESEARCH.md excerpt ==\n'
sed -n '1,120p' TAURI_MOBILE_RESEARCH.md | cat -n

Repository: getappz/agentflare

Length of output: 5670


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,120p' TAURI_MOBILE_RESEARCH.md | cat -n

Repository: 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.

Comment thread TAURI_MOBILE_RESEARCH.md
Comment on lines +34 to +37
- **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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 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:


🏁 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.

Comment thread TAURI_MOBILE_RESEARCH.md
Comment on lines +105 to +107
"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'"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 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.

Comment thread TAURI_MOBILE_RESEARCH.md
Comment on lines +114 to +129
"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"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 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
done

Repository: 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:


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.

Comment thread TAURI_MOBILE_RESEARCH.md
Comment on lines +153 to +154
Android signing is configured in `tauri.conf.json` (`bundle.android.*`) or via
`src-tauri/gen/android/gradle.properties` + `build.gradle.kts` signingConfigs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 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)
PY

Repository: 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]}")
PY

Repository: 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:


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.

@getappz getappz changed the title ui-module: full cliclack consolidation + auth.rs final sweep refactor: ui-module full cliclack consolidation + auth.rs final sweep Jul 18, 2026
@getappz
getappz merged commit 94c6c4a into master Jul 18, 2026
16 checks passed
@getappz
getappz deleted the ui-module-consolidation branch July 18, 2026 14:39
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