feat(iot): integrate Scanner Inbox, inbound Create plan, shift-close, labels, Guard Desk#328
Conversation
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
tokenizers' default esaxx_fast feature compiles esaxx-rs via clang/c++, which fails on Linux VMs where /usr/bin/c++ is clang selecting GCC 14 without libstdc++-14-dev (`cstdint` not found). Keep progressbar+onig only — local_llm only needs load/encode. Document the VM workaround. Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
macOS Enigo holds CGEventSource (!Send), so the timeout thread that fixed Windows CI hangs fails to compile on Darwin Tauri smoke builds. Co-authored-by: Muhammad Rafiq <mohabbis@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0bb5af073
ℹ️ 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".
| const intent = intentId ? pendingById.get(intentId) : null; | ||
| if (!intent) return; | ||
| const card = organizerInboundIntentCopy(intent); | ||
| if (!intent.zone_id) { |
There was a problem hiding this comment.
Verify inbound zones before creating plans
When the webhook payload is CloudEvents/Fabric item, parse_inbound_body stores the event subject as zone_id (the checked-in sample uses lakehouses/lh-001), but this new truthiness check treats any non-empty value as a real Organizer Zone and calls fabric_convert_inbound_intent. In that common case the primary “Create plan” path just fails with no zone with id ... and the UI never offers the Zone-selection flow; validate that the zone exists (or only set zone_id for Ghost-native payloads) before taking this branch.
Useful? React with 👍 / 👎.
| .map_err(|e| e.to_string())? | ||
| .ok_or_else(|| format!("no zone with id {zone_id}"))?; | ||
| let rules = list_folder_rules(&conn, &zone_id).map_err(|e| e.to_string())?; | ||
| let ready_files = crate::organizer::planner::scan_zone_files(&conn, &zone_id) |
There was a problem hiding this comment.
Count only Scanner Inbox source files
For Scanner Inbox two-folder zones, the inbox rule is the readable/non-create source while the destination rule is also readable so planning can inspect conflicts. scan_zone_files scans every can_read rule, so after filing, files already in the destination are counted as ready_files and the banner keeps prompting “Scan & Preview” even when the inbox is empty; count only the source/inbox rule set for this signal.
Useful? React with 👍 / 👎.
| const presetName = | ||
| presetChoice || | ||
| (await ghostPick( |
There was a problem hiding this comment.
Ignore click events when opening guided setup
The existing toolbar wiring still passes organizerRunWizard directly to addEventListener, so clicking the normal “Guided setup” button supplies the click Event as presetChoice. Because that object is truthy, this branch skips the preset picker and looks up ORGANIZER_PRESETS[event], immediately showing “Unknown Organizer preset” instead of opening setup; wrap the handler or accept only string preset names.
Useful? React with 👍 / 👎.
| reset_store_for_tests(); | ||
| let intent = record_intent(Some("zone-1".into()), "pos.close", "Shift closed"); |
There was a problem hiding this comment.
Isolate inbound intent tests from shared store
These new inbound tests share the process-global STORE and the same fabric-inbound-intents.json file with each other and the command-layer conversion test, while Rust runs tests in parallel by default. One test can call reset_store_for_tests() between another test's record_intent and convert_intent/list_pending, producing intermittent empty queues or unknown-intent failures; serialize these tests or give each test an isolated store path.
Useful? React with 👍 / 👎.
| "hash": stored.hash, | ||
| "prev_hash": stored.prev_hash, | ||
| "audit": stored.audit.masked(), | ||
| "label_notes": stored.label_notes, |
There was a problem hiding this comment.
Mask label notes in audit exports
When users export an audit after using the new label flow, these sidecar notes are written raw even though the JSON export masks the audit log itself. The note detail can include the generated label filename, which is derived from the Zone name, so a client/email-like Zone name leaks into the portable JSON/CSV/signed reports despite the existing PII-redaction contract; mask or sanitize stored.label_notes before exporting them.
Useful? React with 👍 / 👎.
Summary
Single integration branch that stacks the IoT feature work into working software on top of master (design docs already merged via #321):
tokenizersesaxx_fastso--features experimentalcompiles on Linux (fix(build): unbreak experimental feature compile (esaxx-rs) #326)fabric_convert_inbound_intent→ read-only plan /Converted;/inbound/webhookalias (feat(inbound): batch-landed intents → Create plan (F2) #327)pos.closetaxonomy, samples, shift-close UI copy; no POS key injection (feat(inbound): pos.close shift-close intent packet (F3) #324)Enigois!Sendon Darwin)Supersedes closed individual PRs #322–#327 and #326 — merge this PR.
Trust invariants preserved: devices/webhooks propose only; Create plan never executes; no camera/mic; Guard Desk stays prototype-labeled.
Validation (this branch)
cargo fmt --checkcargo check --all-targetscargo check --all-targets --features experimentalcargo clippy --all-targets(+ experimental)-- -D warningscargo test --features experimental --lib convertcargo test --lib folder_labelcargo test --test frontend_dom_contractghost mcp demosmoke (plan path)Test plan
/inbound/webhook→ Create plan → Approve separatelypos.closesample → shift-close card