@iasiv5/dsh-quota-watch 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -960,8 +960,9 @@ function mountQuotaCard({
960
960
  const syncCardVisibility = () => {
961
961
  syncFootNarrowness();
962
962
  const cardOn = !surfaceFlags.cardHidden;
963
- const showCard = cardOn && !sidebarCollapsed && !footTooNarrow && !noDataHidden;
964
- const showRail = cardOn && sidebarCollapsed && !noDataHidden;
963
+ const narrowOrCollapsed = footTooNarrow || sidebarCollapsed;
964
+ const showCard = cardOn && !narrowOrCollapsed && !noDataHidden;
965
+ const showRail = cardOn && narrowOrCollapsed && !noDataHidden;
965
966
  container.hidden = !showCard && !showRail;
966
967
  if (showRail) container.dataset.dshQuotaWatchSidebarCollapsed = "";
967
968
  else delete container.dataset.dshQuotaWatchSidebarCollapsed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iasiv5/dsh-quota-watch",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "DSH Web sidebar monitor for GLM Coding Plan quotas and GitHub Copilot credits",
5
5
  "type": "module",
6
6
  "main": "./src/host.mjs",
package/src/client.mjs CHANGED
@@ -911,9 +911,14 @@ export function mountQuotaCard({
911
911
  }
912
912
  const syncCardVisibility = () => {
913
913
  syncFootNarrowness()
914
+ // Rail entry follows the WIDTH signal, not the host attribute: this DSH
915
+ // build (0.2.0-rc.2 web) never writes data-sidebar-collapsed on collapse
916
+ // (verified via CDP + bundle grep), but the foot container measurably
917
+ // narrows — and the 36px gauge icon fits any rail.
914
918
  const cardOn = !surfaceFlags.cardHidden
915
- const showCard = cardOn && !sidebarCollapsed && !footTooNarrow && !noDataHidden
916
- const showRail = cardOn && sidebarCollapsed && !noDataHidden
919
+ const narrowOrCollapsed = footTooNarrow || sidebarCollapsed
920
+ const showCard = cardOn && !narrowOrCollapsed && !noDataHidden
921
+ const showRail = cardOn && narrowOrCollapsed && !noDataHidden
917
922
  container.hidden = !showCard && !showRail
918
923
  if (showRail) container.dataset.dshQuotaWatchSidebarCollapsed = ''
919
924
  else delete container.dataset.dshQuotaWatchSidebarCollapsed