Version
0.11.0 (darwin/arm64, UI build)
What happened
index_status reports the file below under parse_partial (best-effort coverage), and the same
path is what check_index_coverage points at:
mobile-app/src/components/meeting/report-formats/lecture.tsx error_ranges: 71-71,74-74
Both flagged lines are JSX that contains an unescaped & (an attribute string "Q&A" on line 71
and "No significant ... Q&A ..." on line 74). Deleting just the & on one of those two lines
clears the flag for that line and leaves the other one flagged — so the ampersand is the trigger,
not the surrounding code.
This is a coverage-signal-only problem as far as I can see: the file's File, Module, Type and
Function nodes and all of its IMPORTS / CALLS / USAGE edges are present in the graph, so I
cannot point at a concrete symbol that went missing. The line ranges are simply reported as not
fully parsed.
Minimal reproduction
A bare directory of .tsx files is enough — no package.json, tsconfig.json or imports needed.
Index it and run index_status --diagnostics full:
// a-flagged.tsx — reported: 2-2
export const A = () => (
<Section title="Q&A" />
);
// b-clean-escaped.tsx — clean
export const B = () => (
<Section title="Q&A" />
);
// c-clean-single-line.tsx — clean
export const C = () => <Section title="Q&A" />;
// d-clean-unparenthesised.tsx — clean
export const D = () => <Section title="Q&A">
<Child />
</Section>;
// e-flagged-jsx-text.tsx — reported: 3-3
export const E = () => (
<View>
<Label>Date & Time</Label>
</View>
);
// f-clean-js-expression.tsx — clean
export const F = () => (
<View>
<Label>{'Date & Time'}</Label>
</View>
);
Observed: the parenthesised, multi-line JSX trees (a, e) report the & line. The single-line
form (c), the unparenthesised form (d) and the JS-string form (f) are all clean. A
multi-line element with two such attributes reports both lines:
// reported: 3-3,4-4
export const G = () => (
<Section>
<Child title="Q&A" />
<Child title="R&D" />
</Section>
);
Expected
A literal & is valid JSX — in an attribute value and in JSX text — and should parse the same way
it does on a single line, without setting the best-effort coverage signal.
Scope
In the private React Native / Next.js monorepo this came from, 17 of the 29 parse_partial entries
are this one pattern (ampersands in UI copy such as Date & Time, Help & Support,
Account & Security, Q&A), across .tsx and one .html. Everything else in that list is
different: 7 non-JS files (.sql, .css, .mmd, .conf) and 5 test files covered below.
Unrelated second class (happy to split into its own issue)
5 Vitest files are flagged at this construct, which looks independent of the JSX problem:
vi.mock('./x', async (importOriginal) => ({
...(await importOriginal<typeof import('./x')>()),
}));
index_status reports error_ranges: 3-3 for that file. Reproducible on its own in a folder with
that one .ts file.
Version
0.11.0 (darwin/arm64, UI build)
What happened
index_statusreports the file below underparse_partial(best-effort coverage), and the samepath is what
check_index_coveragepoints at:Both flagged lines are JSX that contains an unescaped
&(an attribute string"Q&A"on line 71and
"No significant ... Q&A ..."on line 74). Deleting just the&on one of those two linesclears the flag for that line and leaves the other one flagged — so the ampersand is the trigger,
not the surrounding code.
This is a coverage-signal-only problem as far as I can see: the file's
File,Module,TypeandFunctionnodes and all of itsIMPORTS/CALLS/USAGEedges are present in the graph, so Icannot point at a concrete symbol that went missing. The line ranges are simply reported as not
fully parsed.
Minimal reproduction
A bare directory of
.tsxfiles is enough — nopackage.json,tsconfig.jsonor imports needed.Index it and run
index_status --diagnostics full:Observed: the parenthesised, multi-line JSX trees (
a,e) report the&line. The single-lineform (
c), the unparenthesised form (d) and the JS-string form (f) are all clean. Amulti-line element with two such attributes reports both lines:
Expected
A literal
&is valid JSX — in an attribute value and in JSX text — and should parse the same wayit does on a single line, without setting the best-effort coverage signal.
Scope
In the private React Native / Next.js monorepo this came from, 17 of the 29
parse_partialentriesare this one pattern (ampersands in UI copy such as
Date & Time,Help & Support,Account & Security,Q&A), across.tsxand one.html. Everything else in that list isdifferent: 7 non-JS files (
.sql,.css,.mmd,.conf) and 5 test files covered below.Unrelated second class (happy to split into its own issue)
5 Vitest files are flagged at this construct, which looks independent of the JSX problem:
index_statusreportserror_ranges: 3-3for that file. Reproducible on its own in a folder withthat one
.tsfile.