You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4150b20
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(web): keep Synthos components within React Compiler support
reactCompilerCoverage.test requires every web source file to compile
with no React Compiler bailouts. Twelve Synthos files bailed out on
three unsupported constructs: try/finally, throw inside try, and a
dynamic import() in a component.
Rewrite them without changing behaviour:
- try/catch/finally becomes try/catch followed by the same cleanup.
No catch block rethrows. The two early returns inside try
(ContextDeck, Knowledge open) happen only when the request is stale,
where the old finally was already a no-op. KnowledgeGraph keeps its
boolean result in a local.
- Throws inside try move into small module-level helpers
(assertSavedProfile, assertVaultConfigured, readBrainExport,
readTokenMonitorExport) with the same checks and messages.
- The night-riders scene import moves into loadSceneModule.
Fails before (CI Test Web): 12 failed in reactCompilerCoverage.test.
Passes after: 1288/1288, plus the Synthos unit tests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01A1D6J2UMPo7YBWQFvbg1br
): asserts result is Extract<SynthosProfileResult,{type: "profile"}>{
18
+
if(result.type!=="profile")thrownewError("The host did not return the saved profile.");
19
+
}
20
+
15
21
exportfunctionSynthosCrewProfiles({
16
22
environmentId,
17
23
connected,
@@ -126,7 +132,7 @@ export function SynthosCrewProfiles({
126
132
body: command,
127
133
},
128
134
);
129
-
if(result.type!=="profile")thrownewError("The host did not return the saved profile.");
135
+
assertSavedProfile(result);
130
136
if(command.type==="get"){
131
137
mergeLatest(result.profile);
132
138
}elsesetSelected(result.profile);
@@ -148,10 +154,9 @@ export function SynthosCrewProfiles({
148
154
setError(
149
155
`${causeinstanceofError ? cause.message : "The profile could not be saved."} Your draft is preserved. Refresh profiles, then reselect the current version before retrying a conflict.`,
0 commit comments