This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new d35c52d  ui: fix vue-tsc — drop dead SSR guard in flame-tip tipStyle 
computed
d35c52d is described below

commit d35c52d36e4294bf133868bd51a1ee1fa9d89132
Author: Wu Sheng <[email protected]>
AuthorDate: Wed May 20 08:39:02 2026 +0800

    ui: fix vue-tsc — drop dead SSR guard in flame-tip tipStyle computed
    
    The `if (typeof window === 'undefined') return {}` branch widened the
    inferred return to `{ transform?: string | undefined } | {}`, which
    vue-tsc rejected against the explicit `Record<string, string>` annotation
    (`undefined` is not assignable to `string` under the index signature).
    
    The guard is dead code — this is a Vue + Vite SPA, never SSR — so the
    window object is always present at evaluation. Dropping it leaves a
    single return shape and clears the type error.
    
    Both CI jobs (type-check + publish-image which runs build → run-p
    type-check build-only) were failing on the same root cause.
---
 apps/ui/src/layer/profiling/ProfileFlameGraph.vue | 1 -
 1 file changed, 1 deletion(-)

diff --git a/apps/ui/src/layer/profiling/ProfileFlameGraph.vue 
b/apps/ui/src/layer/profiling/ProfileFlameGraph.vue
index 63f60aa..3f751b1 100644
--- a/apps/ui/src/layer/profiling/ProfileFlameGraph.vue
+++ b/apps/ui/src/layer/profiling/ProfileFlameGraph.vue
@@ -223,7 +223,6 @@ const hoveredPctRoot = computed<string>(() => {
 const TIP_W = 380;
 const TIP_H = 160;
 const tipStyle = computed<Record<string, string>>(() => {
-  if (typeof window === 'undefined') return {};
   const offset = 14;
   let x = tipPos.x + offset;
   let y = tipPos.y + offset;

Reply via email to