<!-- adk-managed-skill -->
Reviewing LWC Mobile Offline
Run a structured offline-priming compliance pass over a Lightning Web
Component, producing a report of issues found and code-level fixes to bring
the component into compliance with Komaci's static analysis requirements
for the Salesforce Mobile App Plus and Field Service Mobile App.
When to Use
- The user asks for a "mobile offline review", "Komaci check", or "offline
priming audit" on a specific LWC.
- Preparing a component to ship in Salesforce Mobile App Plus or Field
Service Mobile App offline mode.
- Investigating priming failures reported by the offline analyzer.
Do NOT use this skill for:
- Building an LWC that uses native mobile capabilities (barcode scanner,
biometrics, location, etc.) — use
using-mobile-native-capabilities
.
- Generic LWC code review — use the appropriate domain skill
(, ,
accessibility-code-review
).
Prerequisites
- Component path (LWC bundle under ).
- Access to the component's JS/TS and HTML templates.
- Local Node + npm; ability to run with the
@salesforce/eslint-plugin-lwc-graph-analyzer
plugin.
Knowledge Base
Mobile Offline Grounding explains the three
violation categories and why each blocks offline priming. Read it before
judging. The per-reviewer references below are the source of truth for the
rules and remediations:
- Inline GraphQL wire configuration: Inline GraphQL Reviewer
- conditional rendering compatibility: lwc:if Reviewer
- Komaci ESLint static analysis: Komaci ESLint Reviewer
Workflow
Step 1 — Scope the review
Identify the component bundle:
,
/
. CSS and meta files are
not in scope for offline priming. If the bundle has multiple HTML
templates, all are reviewed.
Step 2 — Read the grounding and per-reviewer references
Read Mobile Offline Grounding and the three
per-reviewer references end-to-end before judging. Cite the specific
reviewer when emitting each finding so the report is auditable.
Step 3 — / / (HTML)
Walk every
file in the bundle and apply the rules in
lwc:if Reviewer. For each occurrence of
,
, or
, emit a finding with the
exact
/
rewrite — including the nesting required to
preserve
and
semantics.
Step 4 — Inline GraphQL in (JS)
Walk every
/
file in the bundle and apply the rules in
Inline GraphQL Reviewer. For each
that references a
template literal directly (or via a top-level
constant), emit a finding that names a concrete getter and shows the
rewritten
configuration.
Step 5 — Komaci ESLint pass (JS)
Run the Komaci ESLint analyzer over the bundle's JS file using the
bundled script. It applies the
@salesforce/eslint-plugin-lwc-graph-analyzer
recommended ruleset with
the
processor enabled.
bash
scripts/run-komaci.sh path/to/component.js
The script requires
@salesforce/eslint-plugin-lwc-graph-analyzer
to
be resolvable from the working directory, and the component's sibling
HTML templates must live next to the JS file (the plugin's
processor uses them to resolve the offline data
graph). Output is ESLint
on stdout.
For each
entry in the output, group by
and look
up the per-rule remediation in
Komaci ESLint Reviewer. Emit a finding
per (rule, line) pair with the exact remediation text from the
reference; do not invent new advice. See the reference for the manual
invocation if the script is unavailable in the runtime
environment.
Step 6 — Produce the report
Emit a report in this shape:
## Mobile Offline (Komaci priming)
- <reviewer> — <file>:<startLine>:<startColumn>-<endLine>:<endColumn> — <type>
Description: <verbatim from the reviewer reference>
Intent analysis: <verbatim from the reviewer reference>
Suggested action: <verbatim from the reviewer reference>
Code: |
<source snippet from startLine through endLine, optional but
recommended when the violation spans multiple lines>
Applied: yes/no
## Summary
- <n> issues found; <m> fixed; <k> deferred (with reason)
For Komaci ESLint findings, take
/
/
/
from the ESLint message's
/
/
/
.
For Inline GraphQL and
findings, supply the line/column range you
observed in the source. If
/
are not available for a
finding, fall back to
and omit the trailing range.
Cite the reviewer (Inline GraphQL / lwc:if / Komaci ESLint rule id) on every
finding.
Step 7 — Apply fixes
Apply the remediations directly when the user asked for fixes. If a
remediation conflicts with the component's behavior outside offline (e.g.
the developer relies on
for readability and the user is not
yet shipping to mobile offline), surface the conflict in the deferred list
rather than silently rewriting.
Verification Checklist
Troubleshooting
- cannot find the plugin — install
@salesforce/eslint-plugin-lwc-graph-analyzer
in the workspace, or use a
pinned local install path. The plugin is the canonical source of Komaci
rules.
- related errors — the recommended config drives the
bundle processor; do not strip it. The processor expects sibling HTML
files to be discoverable. If running on a stripped-down JS file, supply
the matching HTML in the temp directory.
- No findings for a component you expect to fail — confirm the
recommended ruleset is applied (not just with empty
rules). Some rules require the HTML to be present alongside the JS.
- Findings duplicate from the dedicated reviewer — the Komaci
plugin does not check templates; the check is HTML-only and
comes from Step 3. Findings from Step 5 are JS-only.