Files
openobserve/.github/workflows
ktx-vaidehi 53ba550623 fix: dashboard variables for child, set default value (#10406)
### **PR Type**
Bug fix, Tests


___

### **Description**
- Preserve custom/all defaults on resets

- Mark variables loaded, notify manager

- Pre-set defaults before query loading

- Add Playwright dependency-chain coverage


___

### Diagram Walkthrough


```mermaid
flowchart LR
  parent["Parent variable changes"]
  manager["Variables manager resets children"]
  selector["VariablesValueSelector sync/default logic"]
  defaults["Apply `all`/`custom` default value"]
  notify["Notify manager partial loaded"]
  children["Dependent children load correctly"]
  tests["Playwright chain default tests"]
  parent -- "triggers" --> manager
  manager -- "clears child values" --> selector
  selector -- "sets when configured" --> defaults
  defaults -- "unblocks" --> notify
  notify -- "enables" --> children
  tests -- "verifies" --> children
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>VariablesValueSelector.vue</strong><dd><code>Keep
custom/all defaults during dependency resets</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/VariablesValueSelector.vue

<ul><li>Detect <code>custom</code>/<code>all</code> default
configuration<br> <li> Set defaults when manager resets value<br> <li>
Mark variable partially loaded and ready<br> <li> Pre-apply defaults
before query load</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10406/files#diff-5c6e3bcb87cb64f25bf8157a541604b7a4904c1282acf662cab5d76a5be6bd56">+96/-7</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>dashboard-variables-scoped.js</strong><dd><code>Support
selecting all/custom default in UI</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

tests/ui-testing/pages/dashboardPages/dashboard-variables-scoped.js

<ul><li>Add <code>defaultValueType</code> and <code>customValues</code>
options<br> <li> Toggle default mode to <code>all</code> or
<code>custom</code><br> <li> Fill custom default values for
single/multi<br> <li> Keep legacy <code>defaultValue</code> path</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10406/files#diff-86abb9f90fabd982dedfdd9a21a052a47b6984edc7bd29a51ee104c8c473aec4">+43/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>dashboard-variables-default-values-chain.spec.js</strong><dd><code>Add
dependency-chain default values Playwright suite</code>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>


tests/ui-testing/playwright-tests/Dashboards/dashboard-variables-default-values-chain.spec.js

<ul><li>Test <code>all</code> default survives parent change<br> <li>
Test <code>custom</code> defaults for single/multi<br> <li> Validate
grandchild load with parent defaults<br> <li> Cover full A→B→C→D
dependency chain</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10406/files#diff-2221c8f751dfff03ae4d77245c5b3b881a33c2ffb09e7b7db3052f5f7381bb22">+475/-0</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>playwright.yml</strong><dd><code>Run new dashboard
variables chain spec</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/playwright.yml

<ul><li>Include
<code>dashboard-variables-default-values-chain.spec.js</code> in run
list</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10406/files#diff-7afcd2d8f7b49bda74843f209eefb7b2da45f7e7803bf2e4bd636699b76aa2d3">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2026-02-09 15:47:47 +05:30
..