Hmbown/CodeWhale · error
overlay could not be rendered
Error message
overlay could not be rendered
What it means
`plan` renders the overlay configuration text; when `render_overlay` returns None for a reason other than an explicitly Unsupported adapter (the match falls to the `_` arm), it throws this generic error. It signals an internal gap: the adapter was considered supported/mapped, but no overlay could be produced.
Solutions
- Inspect the mapped identity/provider fields — ensure base URL and required credentials are present in the route config.
- Retry after correcting the provider/model configuration so the adapter is fully populated.
- If it persists, it's a code gap: add the missing `render_overlay` arm/handler for the adapter variant and file an issue with the route details.
- As a workaround, run codewhale without the DSH overlay for this route.
Defensive patterns
Strategy: try-catch
Validate before calling
if render_overlay(&mapped).is_none() && !matches!(mapped.adapter, DshAdapter::Unsupported { .. }) {
eprintln!("overlay rendering failed for a mapped adapter; check route fields (base URL, credentials)");
return Ok(());
} Try / catch
match plan(&identity, allow_full_access, skin, ocean) {
Err(e) if e.to_string().contains("overlay could not be rendered") => {
eprintln!("overlay render failed; verify provider config is fully populated");
}
other => other?,
} Prevention
- Ensure route config includes all fields the overlay template needs (URL, key slot)
- Add a render_overlay arm whenever a new DshAdapter variant is introduced
- Log the mapped adapter variant when rendering fails to speed diagnosis
When it happens
Trigger: `render_overlay(&mapped)` returns `None` while `mapped.adapter` is not `DshAdapter::Unsupported` — e.g. a supported adapter whose identity fields (URL, key slot, params) fail overlay template rendering.
Common situations: Identity mapping produced a partially populated adapter (missing base URL or credential field the overlay template requires); a new DshAdapter variant added without a render_overlay arm; edge-case identity fields the renderer doesn't handle.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- current Codewhale route
- --app must be `web` or `headless`, got
- bundle already installed; use
- cannot locate the installed dsh package root from
- cannot resolve the current Codewhale route
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/ba4f87ff356a7745.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/integrations/dsh/mod.rs:374
}
pub(crate) fn plan(
paths: &DshPaths,
detection: &DshDetection,
identity: &CodewhaleRouteIdentity,
profile: &str,
allow_full_access: bool,
skin: bool,
ocean: bool,
) -> Result<DshPlan> {
let mapped = map_identity(identity, allow_full_access);
let overlay_text = render_overlay(&mapped).ok_or_else(|| match &mapped.adapter {
DshAdapter::Unsupported { reason } => anyhow::anyhow!(
"current Codewhale route {}/{} cannot be carried by DSH: {reason}",
identity.provider_id,
identity.model
),
_ => anyhow::anyhow!("overlay could not be rendered"),
})?;
let overlay_sha256 = sha256_hex(overlay_text.as_bytes());
let mut disclosures = mapped.disclosures.clone();
let shadowing = shadowing_namespaces(detection);
if !shadowing.is_empty() {
disclosures.push(format!(
"$DSH_HOME/settings.yaml has [{}] sections; DSH layers those over the overlay per field, so the saved DSH selection can shadow the pinned identity until you clear it in DSH.",
shadowing.join(", ")
));
}
if !detection.profiles.iter().any(|p| p == profile) {
disclosures.push(format!(
"DSH profile `{profile}` is not initialized yet; dsh will create $DSH_HOME/profiles/{profile} on first launch (its own documented behavior)."
));
}
if skin {
disclosures.push(
"Skin: Codewhale palette is applied through the bundle profile via overrideTokens (on by default for install-bundle). The --patch overlay path is unchanged; launch --profile web|headless stays overlay-only."View on GitHub (pinned to 73e0f67d83)