newmark-agent 0.5.8 → 0.5.10

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.
@@ -1102,6 +1102,9 @@ button.left-ws-item {
1102
1102
  }
1103
1103
  .conversation-selection-float.conversation-drag-following {
1104
1104
  transition: opacity 120ms var(--ease-out-expo) !important;
1105
+ transform-origin: center;
1106
+ translate: 0 var(--liquid-boundary-y, 0px);
1107
+ scale: calc(1 + var(--liquid-boundary-pull, 0) * .06) calc(1 - var(--liquid-boundary-pull, 0) * .025);
1105
1108
  }
1106
1109
  .conversation-drag-content {
1107
1110
  position: absolute;
@@ -3575,11 +3578,32 @@ button.todo-item { background: transparent; }
3575
3578
  #right-tabs { position: relative; }
3576
3579
  .left-nav-icon.liquid-tool-active,
3577
3580
  .lt-item.liquid-tool-active { background: var(--control-hover-bg); color: var(--text-bright); }
3581
+ .left-nav-icon.liquid-selection-covered,
3582
+ .lt-item.liquid-selection-covered,
3583
+ .left-ws-item.liquid-selection-covered,
3584
+ .tab-btn.liquid-selection-covered,
3585
+ .stab-btn.liquid-selection-covered,
3586
+ .mode-toggle-btn.liquid-selection-covered,
3587
+ .memory-lab-view-menu button.liquid-selection-covered {
3588
+ background: transparent !important;
3589
+ border-color: transparent !important;
3590
+ box-shadow: none !important;
3591
+ }
3592
+ .left-nav-icon:active,
3593
+ .lt-item:active,
3594
+ .left-ws-item:active,
3595
+ .tab-btn:active,
3596
+ .stab-btn:active,
3597
+ .mode-toggle-btn:active,
3598
+ .memory-lab-view-menu button:active { transform: none !important; scale: 1 !important; }
3578
3599
  .liquid-selection-float {
3579
3600
  --liquid-lift-scale: .94;
3580
3601
  --liquid-motion-angle: 0rad;
3581
3602
  --liquid-motion-stretch: 1;
3582
3603
  --liquid-motion-squash: 1;
3604
+ --liquid-boundary-x: 0px;
3605
+ --liquid-boundary-y: 0px;
3606
+ --liquid-boundary-pull: 0;
3583
3607
  position: absolute;
3584
3608
  z-index: 4;
3585
3609
  display: flex;
@@ -3599,15 +3623,17 @@ button.todo-item { background: transparent; }
3599
3623
  backdrop-filter: none;
3600
3624
  -webkit-backdrop-filter: none;
3601
3625
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(0,0,0,0.18), 0 9px 24px rgba(0,0,0,0.28);
3602
- transition: top 240ms var(--ease-out-expo), left 240ms var(--ease-out-expo), width 240ms var(--ease-out-expo), height 240ms var(--ease-out-expo), opacity 80ms var(--ease-out-expo), transform 24ms linear;
3626
+ transition: top 240ms var(--ease-out-expo), left 240ms var(--ease-out-expo), width 240ms var(--ease-out-expo), height 240ms var(--ease-out-expo), opacity 80ms var(--ease-out-expo), transform 24ms linear, translate 110ms var(--ease-out-expo), scale 80ms linear;
3603
3627
  will-change: top, left, width, height, transform;
3628
+ translate: var(--liquid-boundary-x) var(--liquid-boundary-y);
3629
+ scale: calc(1 + var(--liquid-boundary-pull) * .06) calc(1 - var(--liquid-boundary-pull) * .025);
3604
3630
  }
3605
3631
  .liquid-selection-float.visible { opacity: 1; --liquid-lift-scale: 1; }
3606
3632
  .liquid-selection-float.liquid-selection-landing {
3607
3633
  opacity: 0;
3608
3634
  --liquid-lift-scale: .86;
3609
3635
  transform: scale(var(--liquid-lift-scale)) rotate(var(--liquid-motion-angle)) scaleX(var(--liquid-motion-stretch)) scaleY(var(--liquid-motion-squash)) rotate(calc(-1 * var(--liquid-motion-angle)));
3610
- transition: opacity 120ms var(--ease-out-expo), transform 120ms var(--ease-out-expo) !important;
3636
+ transition: opacity 180ms var(--ease-out-expo), transform 180ms var(--ease-out-expo) !important;
3611
3637
  }
3612
3638
  .liquid-selection-float.liquid-selection-viewport {
3613
3639
  position: fixed;
@@ -3617,6 +3643,51 @@ button.todo-item { background: transparent; }
3617
3643
  border: 0;
3618
3644
  }
3619
3645
  .liquid-selection-float.liquid-selection-primed { transition: none !important; }
3646
+ .liquid-selection-float.liquid-fixed-control-float {
3647
+ color: var(--text);
3648
+ box-shadow: var(--liquid-top-highlight), var(--liquid-inner-shadow), 0 5px 16px rgba(0,0,0,.14);
3649
+ }
3650
+ .liquid-selection-float.liquid-fixed-control-float.liquid-selection-primed {
3651
+ box-shadow: none;
3652
+ }
3653
+ .liquid-fixed-control-content {
3654
+ position: absolute;
3655
+ inset: 0;
3656
+ z-index: 2;
3657
+ display: flex;
3658
+ align-items: center;
3659
+ justify-content: center;
3660
+ gap: 6px;
3661
+ color: inherit;
3662
+ pointer-events: none;
3663
+ }
3664
+ .liquid-fixed-control-content * { color: inherit !important; }
3665
+ .liquid-fixed-control-content svg { fill: none; stroke: currentColor !important; }
3666
+ .liquid-fixed-source-covered {
3667
+ color: transparent !important;
3668
+ background: transparent !important;
3669
+ background-color: transparent !important;
3670
+ background-image: none !important;
3671
+ border-color: transparent !important;
3672
+ box-shadow: none !important;
3673
+ text-shadow: none !important;
3674
+ }
3675
+ .liquid-fixed-source-covered > * { visibility: hidden !important; }
3676
+ .liquid-fixed-source-covered::before,
3677
+ .liquid-fixed-source-covered::after {
3678
+ content: none !important;
3679
+ opacity: 0 !important;
3680
+ visibility: hidden !important;
3681
+ box-shadow: none !important;
3682
+ background: transparent !important;
3683
+ }
3684
+ [data-theme="light"] .liquid-selection-float.liquid-fixed-control-float {
3685
+ color: var(--text);
3686
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(42,52,82,.05), 0 4px 13px rgba(42,52,82,.08);
3687
+ }
3688
+ [data-theme="light"] .liquid-selection-float.liquid-fixed-control-float.liquid-selection-primed {
3689
+ box-shadow: none;
3690
+ }
3620
3691
  .liquid-selection-float.liquid-selection-viewport:popover-open { display: flex; }
3621
3692
  .liquid-selection-float::-webkit-scrollbar { display: none; }
3622
3693
  .liquid-selection-canvas {
@@ -3883,6 +3954,8 @@ button.todo-item { background: transparent; }
3883
3954
 
3884
3955
  #submit-btn:hover { transform: scale(1.08); box-shadow: 0 4px 20px rgba(91,120,255,0.5); }
3885
3956
  #submit-btn:active { transform: scale(0.92); transition: transform 80ms var(--ease-out-expo); }
3957
+ #submit-btn::after { display: none !important; }
3958
+ #submit-btn:active { transform: none; scale: 1; }
3886
3959
 
3887
3960
  #submit-btn.working {
3888
3961
  background: linear-gradient(135deg, #3a3a60 0%, #4a4a70 100%);
@@ -5733,6 +5806,26 @@ button:active:not(:disabled) {
5733
5806
  button:active:not(:disabled)::after { opacity: 1; }
5734
5807
  button:disabled { opacity: 0.5; }
5735
5808
 
5809
+ /* Unified glass controls are rendered by a real top-layer float. Their local
5810
+ pseudo glass is disabled so the original color block cannot look like a
5811
+ second, legacy press surface under the carried glass. */
5812
+ .left-nav-icon::after,
5813
+ .lt-item::after,
5814
+ .left-ws-item::after,
5815
+ .tab-btn::after,
5816
+ .stab-btn::after,
5817
+ .mode-toggle-btn::after,
5818
+ .memory-lab-view-menu button::after,
5819
+ .left-collapse-btn::after,
5820
+ .sec-btn::after,
5821
+ .right-open-btn::after,
5822
+ .shell-btn::after,
5823
+ .option-btn::after,
5824
+ .stack-icon-btn::after { display: none !important; }
5825
+ #left-ws-add::after { display: none !important; }
5826
+ #left-ws-add:active,
5827
+ .left-collapse-btn:active { transform: none !important; scale: 1 !important; }
5828
+
5736
5829
  /* Borderless utility actions stay visually quiet; they never gain a glass plate. */
5737
5830
  .msg-action-btn::after,
5738
5831
  .top-btn::after,
@@ -5799,7 +5892,25 @@ input[type="checkbox"].liquid-switch-dragging::before {
5799
5892
  box-shadow: var(--liquid-top-highlight), var(--liquid-inner-shadow), 0 7px 18px rgba(0,0,0,.32);
5800
5893
  transform: translateX(var(--liquid-switch-x)) translateY(-2px) scale(1.22);
5801
5894
  transition: none;
5895
+ opacity: 0;
5896
+ }
5897
+ .liquid-switch-float {
5898
+ position: fixed;
5899
+ z-index: 1200;
5900
+ pointer-events: none;
5901
+ width: 22px;
5902
+ height: 22px;
5903
+ border-radius: var(--radius-full);
5904
+ background: var(--liquid-refraction);
5905
+ backdrop-filter: blur(calc(var(--glass-blur-3) * 4)) saturate(145%);
5906
+ -webkit-backdrop-filter: blur(calc(var(--glass-blur-3) * 4)) saturate(145%);
5907
+ box-shadow: var(--liquid-top-highlight), var(--liquid-inner-shadow), 0 7px 18px rgba(0,0,0,.32);
5908
+ opacity: 0;
5909
+ transform: translate(-50%, -50%) scale(.86);
5910
+ transition: opacity 105ms var(--ease-out-expo), transform 105ms var(--ease-out-expo);
5802
5911
  }
5912
+ .liquid-switch-float.visible { opacity: 1; transform: translate(-50%, -50%) scale(1.22); }
5913
+ .liquid-switch-float.landing { opacity: 0; transform: translate(-50%, -50%) scale(.86); }
5803
5914
 
5804
5915
  /* Center composer and terminal stay solid. Only their left/right edge catches
5805
5916
  light so the glass sidebars remain the visual frame. */
@@ -6411,6 +6522,7 @@ input[type="checkbox"].liquid-switch-dragging::before {
6411
6522
  <select class="tool-select" id="mode-select">
6412
6523
  <option value="build">Build</option>
6413
6524
  <option value="plan">Plan</option>
6525
+ <option value="chat">Chat</option>
6414
6526
  <option value="goal">Goal</option>
6415
6527
  <option value="flow">Flow</option>
6416
6528
  </select>
@@ -6878,6 +6990,7 @@ var NEWMARK_I18N = {
6878
6990
  'input.next': 'Next',
6879
6991
  'mode.build': 'Build',
6880
6992
  'mode.plan': 'Plan',
6993
+ 'mode.chat': 'Chat',
6881
6994
  'mode.goal': 'Goal',
6882
6995
  'mode.flow': 'Flow',
6883
6996
  'intel.low': 'low',
@@ -7610,6 +7723,7 @@ var NEWMARK_I18N = {
7610
7723
  'input.next': 'Next',
7611
7724
  'mode.build': 'Build',
7612
7725
  'mode.plan': 'Plan',
7726
+ 'mode.chat': 'Chat',
7613
7727
  'mode.goal': 'Goal',
7614
7728
  'mode.flow': 'Flow',
7615
7729
  'intel.low': 'low',
@@ -8342,7 +8456,7 @@ function applyLanguageToUi() {
8342
8456
  setTitleAndLabel('#lt-ws-icon', t('left.workspaces'));
8343
8457
  updateSubmitButtonState();
8344
8458
  setTitleAndLabel('#left-collapse-btn', t('left.collapse'));
8345
- setSelectOptionText('mode-select', { build: t('mode.build'), plan: t('mode.plan'), goal: t('mode.goal'), flow: t('mode.flow') });
8459
+ setSelectOptionText('mode-select', { build: t('mode.build'), plan: t('mode.plan'), chat: t('mode.chat'), goal: t('mode.goal'), flow: t('mode.flow') });
8346
8460
  setSelectOptionText('intel-select', { low: t('intel.low'), medium: t('intel.medium'), high: t('intel.high'), xhigh: t('intel.xhigh'), max: t('intel.max'), ultra: t('intel.ultra') });
8347
8461
  var guideBtn = document.querySelector('.mode-toggle-btn[data-mode="guide"]');
8348
8462
  var nextBtn = document.querySelector('.mode-toggle-btn[data-mode="next"]');
@@ -12559,7 +12673,7 @@ function renderPendingOptionsInChat(options) {
12559
12673
  }
12560
12674
 
12561
12675
  function setVisibleMode(mode) {
12562
- var nextMode = ['build', 'plan', 'goal', 'flow'].indexOf(String(mode || '').toLowerCase()) >= 0
12676
+ var nextMode = ['build', 'plan', 'chat', 'goal', 'flow'].indexOf(String(mode || '').toLowerCase()) >= 0
12563
12677
  ? String(mode).toLowerCase()
12564
12678
  : 'build';
12565
12679
  state.mode = nextMode;
@@ -13542,10 +13656,6 @@ var liquidKyantFragmentSource = '#version 300 es\nprecision highp float;\n' +
13542
13656
 
13543
13657
  function createKyantLiquidRenderer() {
13544
13658
  var canvas = document.createElement('canvas');
13545
- var displayCanvas = document.createElement('canvas');
13546
- displayCanvas.className = 'liquid-selection-canvas';
13547
- var displayContext = displayCanvas.getContext('2d', { alpha:true });
13548
- if (!displayContext) return null;
13549
13659
  var gl = canvas.getContext('webgl2', { alpha:true, antialias:false, premultipliedAlpha:true, powerPreference:'high-performance' });
13550
13660
  if (!gl) return null;
13551
13661
  var vs = compileLiquidShader(gl, gl.VERTEX_SHADER, liquidKyantVertexSource);
@@ -13585,8 +13695,8 @@ function createKyantLiquidRenderer() {
13585
13695
  gl.uniform1i(uniforms.content, 0);
13586
13696
  var renderer = {
13587
13697
  canvas: canvas,
13588
- displayCanvas: displayCanvas,
13589
- displayContext: displayContext,
13698
+ displayCanvas: null,
13699
+ displayContext: null,
13590
13700
  gl: gl,
13591
13701
  program: program,
13592
13702
  texture: texture,
@@ -13625,7 +13735,20 @@ function acquireKyantLiquidRenderer(float) {
13625
13735
  renderer.generation += 1;
13626
13736
  if (renderer.renderFrame) cancelAnimationFrame(renderer.renderFrame);
13627
13737
  renderer.renderFrame = 0;
13628
- renderer.displayCanvas.remove();
13738
+ if (renderer.displayCanvas) renderer.displayCanvas.remove();
13739
+ // The WebGL program/texture may be pooled, but the visible 2D canvas must
13740
+ // never move between floats. Chromium can retain the old promoted-layer
13741
+ // bounds when the same canvas is detached from a large float and mounted
13742
+ // into a smaller popover, producing modal-sized white compositor planes.
13743
+ var displayCanvas = document.createElement('canvas');
13744
+ displayCanvas.className = 'liquid-selection-canvas';
13745
+ var displayContext = displayCanvas.getContext('2d', { alpha:true });
13746
+ if (!displayContext) {
13747
+ renderer.owner = null;
13748
+ return null;
13749
+ }
13750
+ renderer.displayCanvas = displayCanvas;
13751
+ renderer.displayContext = displayContext;
13629
13752
  renderer.lastGeometry = null;
13630
13753
  renderer.pendingGeometry = null;
13631
13754
  return renderer;
@@ -13639,6 +13762,10 @@ function uploadKyantLiquidFrame(renderer, frame) {
13639
13762
  gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,frame.bitmap);
13640
13763
  renderer.textureReady = true;
13641
13764
  renderer.frameId = frame.id;
13765
+ // A new backdrop must be copied into the visible canvas even when the
13766
+ // float geometry has not changed. Otherwise the geometry cache skips the
13767
+ // draw and leaves the previously captured backdrop on screen.
13768
+ renderer.lastGeometry = null;
13642
13769
  return true;
13643
13770
  }
13644
13771
 
@@ -13662,6 +13789,7 @@ function attachKyantLiquidRenderer(float, frame) {
13662
13789
  var canvas = renderer.canvas;
13663
13790
  var displayCanvas = renderer.displayCanvas;
13664
13791
  var displayContext = renderer.displayContext;
13792
+ if (!displayCanvas || !displayContext) { float.dataset.kyantRenderer = 'display-unavailable'; return; }
13665
13793
  var gl = renderer.gl;
13666
13794
  var program = renderer.program;
13667
13795
  var texture = renderer.texture;
@@ -13669,8 +13797,11 @@ function attachKyantLiquidRenderer(float, frame) {
13669
13797
  var generation = renderer.generation;
13670
13798
  float.dataset.kyantRenderer = 'webgl2';
13671
13799
  float._kyantTextureReady = false;
13672
- float._kyantDrawReady = false;
13673
- delete float.dataset.kyantDrawReady;
13800
+ var hasVisibleDraw = float._kyantDrawReady === true && displayCanvas.parentNode === float;
13801
+ if (!hasVisibleDraw) {
13802
+ float._kyantDrawReady = false;
13803
+ delete float.dataset.kyantDrawReady;
13804
+ }
13674
13805
  float._renderKyantGlass = function(geometry, immediate) {
13675
13806
  renderer.pendingGeometry = geometry || null;
13676
13807
  if (!renderer.textureReady || renderer.owner !== float || !float.isConnected) return;
@@ -13700,6 +13831,8 @@ function attachKyantLiquidRenderer(float, frame) {
13700
13831
  if (canvas.height !== pixelHeight) canvas.height = pixelHeight;
13701
13832
  if (displayCanvas.width !== pixelWidth) displayCanvas.width = pixelWidth;
13702
13833
  if (displayCanvas.height !== pixelHeight) displayCanvas.height = pixelHeight;
13834
+ displayCanvas.style.width = width + 'px';
13835
+ displayCanvas.style.height = height + 'px';
13703
13836
  gl.viewport(0,0,pixelWidth,pixelHeight);
13704
13837
  gl.useProgram(program);
13705
13838
  function uniformChanged(key, values, apply) {
@@ -13740,6 +13873,8 @@ function attachKyantLiquidRenderer(float, frame) {
13740
13873
  renderer.lastGeometry = null;
13741
13874
  renderer.pendingGeometry = null;
13742
13875
  displayCanvas.remove();
13876
+ renderer.displayCanvas = null;
13877
+ renderer.displayContext = null;
13743
13878
  delete float._kyantRendererRef;
13744
13879
  };
13745
13880
  if (frame && frame.bitmap && renderer.owner === float && renderer.generation === generation && float.isConnected) {
@@ -13867,13 +14002,25 @@ function landLiquidSelectionFloat(float, cleanup, onComplete) {
13867
14002
  if (!float) { cleanup(); if (onComplete) onComplete(); return; }
13868
14003
  var reducedMotion = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
13869
14004
  if (!float.isConnected) { cleanup(); if (onComplete) onComplete(); return; }
14005
+ var liftStartedAt = Number(float._liquidLiftStartedAt || performance.now());
14006
+ var remainingLift = reducedMotion ? 0 : Math.max(0, 360 - (performance.now() - liftStartedAt));
14007
+ if (remainingLift > 0) {
14008
+ setTimeout(function() { landLiquidSelectionFloat(float, cleanup, onComplete); }, remainingLift);
14009
+ return;
14010
+ }
13870
14011
  stopLiquidMotionTracking(float);
13871
14012
  float.classList.add('liquid-selection-landing');
13872
14013
  float._liquidLandingTimer = setTimeout(function() {
13873
14014
  cleanup();
13874
14015
  scheduleLiquidBackdropPrime();
13875
14016
  if (onComplete) onComplete();
13876
- }, reducedMotion ? 0 : 120);
14017
+ }, reducedMotion ? 0 : 180);
14018
+ }
14019
+
14020
+ function beginLiquidSelectionLift(float) {
14021
+ if (!float) return;
14022
+ if (!float._liquidLiftStartedAt) float._liquidLiftStartedAt = performance.now();
14023
+ float.classList.add('visible');
13877
14024
  }
13878
14025
 
13879
14026
  function wireLiquidMenuInteractions(menu) {
@@ -14005,7 +14152,7 @@ function wireLiquidMenuInteractions(menu) {
14005
14152
  if (float._liquidLandingTimer) clearTimeout(float._liquidLandingTimer);
14006
14153
  float._liquidLandingTimer = 0;
14007
14154
  float.classList.remove('liquid-selection-landing');
14008
- float.classList.add('visible');
14155
+ beginLiquidSelectionLift(float);
14009
14156
  position(target);
14010
14157
  } else {
14011
14158
  var selected = menu.querySelector('button.model-select-menu-option.selected, button.newmark-select-option.selected');
@@ -14021,7 +14168,7 @@ function wireLiquidMenuInteractions(menu) {
14021
14168
  requestAnimationFrame(function() {
14022
14169
  if (!float) return;
14023
14170
  float.classList.remove('liquid-selection-primed');
14024
- float.classList.add('visible');
14171
+ beginLiquidSelectionLift(float);
14025
14172
  requestAnimationFrame(function() { if (float) position(target); });
14026
14173
  });
14027
14174
  }
@@ -14056,6 +14203,16 @@ function wireLiquidRailInteractions(container, selector) {
14056
14203
  }
14057
14204
  function position(item) {
14058
14205
  if (!item || !float) return;
14206
+ float.style.setProperty('--liquid-boundary-x', '0px');
14207
+ float.style.setProperty('--liquid-boundary-y', '0px');
14208
+ float.style.setProperty('--liquid-boundary-pull', '0');
14209
+ if (float._liquidCovered && float._liquidCovered !== item) {
14210
+ float._liquidCovered.classList.remove('liquid-selection-covered');
14211
+ }
14212
+ if (item !== source) {
14213
+ item.classList.add('liquid-selection-covered');
14214
+ float._liquidCovered = item;
14215
+ }
14059
14216
  if (float.classList.contains('liquid-selection-viewport')) {
14060
14217
  var rect = item.getBoundingClientRect();
14061
14218
  var edge = liquidInteractionEdgePx();
@@ -14100,6 +14257,8 @@ function wireLiquidRailInteractions(container, selector) {
14100
14257
  var minCenter = Math.min.apply(null, centers);
14101
14258
  var maxCenter = Math.max.apply(null, centers);
14102
14259
  var projectedCenter = Math.max(minCenter, Math.min(maxCenter, pointerAxis));
14260
+ var blockedDelta = pointerAxis < minCenter ? pointerAxis - minCenter : pointerAxis > maxCenter ? pointerAxis - maxCenter : 0;
14261
+ var resisted = Math.sign(blockedDelta) * Math.sqrt(Math.abs(blockedDelta)) * 0.6;
14103
14262
  var edge = liquidInteractionEdgePx();
14104
14263
  var left = horizontal ? projectedCenter - rect.width / 2 - edge : rect.left - edge;
14105
14264
  var top = horizontal ? rect.top - edge : projectedCenter - rect.height / 2 - edge;
@@ -14107,6 +14266,14 @@ function wireLiquidRailInteractions(container, selector) {
14107
14266
  float.style.top = top + 'px';
14108
14267
  float.style.width = (rect.width + edge * 2) + 'px';
14109
14268
  float.style.height = (rect.height + edge * 2) + 'px';
14269
+ float.style.setProperty('--liquid-boundary-x', horizontal ? resisted.toFixed(2) + 'px' : '0px');
14270
+ float.style.setProperty('--liquid-boundary-y', horizontal ? '0px' : resisted.toFixed(2) + 'px');
14271
+ float.style.setProperty('--liquid-boundary-pull', Math.min(1, Math.abs(resisted) / 28).toFixed(3));
14272
+ if (target && target !== source) {
14273
+ if (float._liquidCovered && float._liquidCovered !== target) float._liquidCovered.classList.remove('liquid-selection-covered');
14274
+ target.classList.add('liquid-selection-covered');
14275
+ float._liquidCovered = target;
14276
+ }
14110
14277
  }
14111
14278
  function detachWindowTracking() {
14112
14279
  window.removeEventListener('pointermove', onPointerMove, true);
@@ -14116,6 +14283,7 @@ function wireLiquidRailInteractions(container, selector) {
14116
14283
  function clear() {
14117
14284
  detachWindowTracking();
14118
14285
  if (source) source.classList.remove('liquid-selection-source');
14286
+ if (float && float._liquidCovered) float._liquidCovered.classList.remove('liquid-selection-covered');
14119
14287
  stopLiquidMotionTracking(float);
14120
14288
  if (float && float._liquidLandingTimer) clearTimeout(float._liquidLandingTimer);
14121
14289
  if (float && float._releaseKyantGlass) float._releaseKyantGlass();
@@ -14139,6 +14307,9 @@ function wireLiquidRailInteractions(container, selector) {
14139
14307
  try { container.releasePointerCapture(pointer); } catch (_) {}
14140
14308
  pointer = null;
14141
14309
  if (commit) {
14310
+ float.style.setProperty('--liquid-boundary-x', '0px');
14311
+ float.style.setProperty('--liquid-boundary-y', '0px');
14312
+ float.style.setProperty('--liquid-boundary-pull', '0');
14142
14313
  position(commit);
14143
14314
  }
14144
14315
  waitForLiquidSelectionArrival(float, function() {
@@ -14175,7 +14346,7 @@ function wireLiquidRailInteractions(container, selector) {
14175
14346
  if (float._liquidLandingTimer) clearTimeout(float._liquidLandingTimer);
14176
14347
  float._liquidLandingTimer = 0;
14177
14348
  float.classList.remove('liquid-selection-landing');
14178
- float.classList.add('visible');
14349
+ beginLiquidSelectionLift(float);
14179
14350
  position(target);
14180
14351
  } else {
14181
14352
  source = container.querySelector('.liquid-tool-active') || container.querySelector(selector + '.active') || pressed;
@@ -14190,7 +14361,7 @@ function wireLiquidRailInteractions(container, selector) {
14190
14361
  requestAnimationFrame(function() {
14191
14362
  if (!float) return;
14192
14363
  float.classList.remove('liquid-selection-primed');
14193
- float.classList.add('visible');
14364
+ beginLiquidSelectionLift(float);
14194
14365
  requestAnimationFrame(function() { if (float) position(target); });
14195
14366
  });
14196
14367
  }
@@ -14205,12 +14376,238 @@ function wireLiquidRailInteractions(container, selector) {
14205
14376
  }, true);
14206
14377
  }
14207
14378
 
14379
+ // Legacy glass buttons used to rely on local :active scaling. Bridge only the
14380
+ // explicitly glass interaction classes to the same single-float lifecycle as
14381
+ // rails and menus; structural/content buttons are intentionally excluded.
14382
+ function wireLegacyLiquidButtons() {
14383
+ // Disabled: the broad document-level bridge could leave source controls
14384
+ // hidden when their click rebuilt or closed the owning surface. Fixed
14385
+ // controls are migrated individually instead of mutating every matching
14386
+ // button through one global capture listener.
14387
+ return;
14388
+ var selector = [
14389
+ '.top-btn', '#left-ws-add', '.left-collapse-btn', '.sec-btn', '.right-open-btn', '#submit-btn',
14390
+ '.shell-btn', '.option-btn', '.stack-icon-btn'
14391
+ ].join(',');
14392
+ var active = null;
14393
+ function clearFloat(commit) {
14394
+ if (!active) return;
14395
+ var item = active;
14396
+ active = null;
14397
+ landLiquidSelectionFloat(item.float, function() {
14398
+ item.source.classList.remove('liquid-click-source');
14399
+ item.source.style.removeProperty('visibility');
14400
+ delete item.source.dataset.liquidClickPending;
14401
+ if (item.float._releaseKyantGlass) item.float._releaseKyantGlass();
14402
+ if (item.float.parentNode) item.float.parentNode.removeChild(item.float);
14403
+ }, function() {
14404
+ if (!commit || !item.source.isConnected) return;
14405
+ item.source.dataset.liquidClickReplayed = 'true';
14406
+ item.source.click();
14407
+ });
14408
+ }
14409
+ document.addEventListener('pointerdown', function(event) {
14410
+ var source = event.target && event.target.closest ? event.target.closest(selector) : null;
14411
+ if (!source || source.disabled || event.button !== 0 ||
14412
+ source.closest('.liquid-selection-float, #mode-toggle, #left-tool-surface, #left-thumb, #left-ws-list, #right-tabs, .model-select-menu, .newmark-select-menu')) return;
14413
+ event.preventDefault();
14414
+ event.stopPropagation();
14415
+ if (active) clearFloat(false);
14416
+ var rect = source.getBoundingClientRect();
14417
+ var edge = liquidInteractionEdgePx();
14418
+ var float = document.createElement('div');
14419
+ float.className = 'liquid-selection-float liquid-selection-primed';
14420
+ var floatContent = document.createElement('div');
14421
+ floatContent.className = 'liquid-click-content';
14422
+ Array.from(source.childNodes).forEach(function(node) {
14423
+ floatContent.appendChild(node.cloneNode(true));
14424
+ });
14425
+ float.appendChild(floatContent);
14426
+ float.style.left = (rect.left - edge) + 'px';
14427
+ float.style.top = (rect.top - edge) + 'px';
14428
+ float.style.width = (rect.width + edge * 2) + 'px';
14429
+ float.style.height = (rect.height + edge * 2) + 'px';
14430
+ float._liquidTargetRect = { left: rect.left - edge, top: rect.top - edge, width: rect.width + edge * 2, height: rect.height + edge * 2 };
14431
+ mountLiquidViewportFloat(float);
14432
+ active = { source: source, float: float, pointer: event.pointerId, rect: rect, startX: event.clientX, startY: event.clientY };
14433
+ source.dataset.liquidClickPending = 'true';
14434
+ source.classList.add('liquid-click-source');
14435
+ showLiquidViewportFloat(float);
14436
+ requestAnimationFrame(function() {
14437
+ if (!active || active.float !== float) return;
14438
+ float.classList.remove('liquid-selection-primed');
14439
+ beginLiquidSelectionLift(float);
14440
+ });
14441
+ function onMove(move) {
14442
+ if (!active || active.float !== float || move.pointerId !== event.pointerId) return;
14443
+ var dx = move.clientX - active.startX;
14444
+ var dy = move.clientY - active.startY;
14445
+ var distance = Math.hypot(dx, dy);
14446
+ if (distance < 2) return;
14447
+ move.preventDefault();
14448
+ var resistedDistance = Math.min(4.5, Math.sqrt(distance) * 0.625);
14449
+ var ratio = resistedDistance / Math.max(1, distance);
14450
+ float.style.setProperty('--liquid-boundary-x', (dx * ratio).toFixed(2) + 'px');
14451
+ float.style.setProperty('--liquid-boundary-y', (dy * ratio).toFixed(2) + 'px');
14452
+ float.style.setProperty('--liquid-boundary-pull', Math.min(1, resistedDistance / 18).toFixed(3));
14453
+ }
14454
+ function finish(commit) {
14455
+ document.removeEventListener('pointermove', onMove, true);
14456
+ document.removeEventListener('pointerup', onUp, true);
14457
+ document.removeEventListener('pointercancel', onCancel, true);
14458
+ float.style.setProperty('--liquid-boundary-x', '0px');
14459
+ float.style.setProperty('--liquid-boundary-y', '0px');
14460
+ float.style.setProperty('--liquid-boundary-pull', '0');
14461
+ clearFloat(commit);
14462
+ }
14463
+ function onUp(up) { if (up.pointerId === event.pointerId) finish(true); }
14464
+ function onCancel(cancel) { if (cancel.pointerId === event.pointerId) finish(false); }
14465
+ document.addEventListener('pointermove', onMove, true);
14466
+ document.addEventListener('pointerup', onUp, true);
14467
+ document.addEventListener('pointercancel', onCancel, true);
14468
+ }, true);
14469
+ document.addEventListener('click', function(event) {
14470
+ var source = event.target && event.target.closest ? event.target.closest(selector) : null;
14471
+ if (!source) return;
14472
+ if (source.dataset.liquidClickReplayed === 'true') {
14473
+ delete source.dataset.liquidClickReplayed;
14474
+ return;
14475
+ }
14476
+ if (source.dataset.liquidClickPending === 'true') {
14477
+ event.preventDefault();
14478
+ event.stopImmediatePropagation();
14479
+ return;
14480
+ }
14481
+ if (active && active.source === source) {
14482
+ event.preventDefault();
14483
+ event.stopImmediatePropagation();
14484
+ }
14485
+ }, true);
14486
+ }
14487
+
14488
+ function wireFixedPrimaryLiquidButtons() {
14489
+ if (document.documentElement.dataset.fixedPrimaryLiquidWired === 'true') return;
14490
+ document.documentElement.dataset.fixedPrimaryLiquidWired = 'true';
14491
+ var selector = [
14492
+ '#left-ws-add', '.left-collapse-btn', '.sec-btn', '.et-btn.primary',
14493
+ '.right-open-btn', '.shell-btn', '.option-btn', '.stack-icon-btn',
14494
+ '#submit-btn'
14495
+ ].join(',');
14496
+ var excludedSelector = [
14497
+ '.msg-action-btn', '.conv-more-btn', '.provider-icon-btn',
14498
+ '.work-review-toggle', '.conversation-work-run-head',
14499
+ '.shell-block-header', '.diff-block-header', '.work-review-head',
14500
+ '.message-edit-submit', '.message-edit-cancel'
14501
+ ].join(',');
14502
+ document.addEventListener('pointerdown', function(event) {
14503
+ var source = event.target && event.target.closest ? event.target.closest(selector) : null;
14504
+ if (!source || source.matches(excludedSelector) || source.disabled || event.button !== 0 || source.dataset.fixedLiquidActive === 'true') return;
14505
+ event.preventDefault();
14506
+ event.stopImmediatePropagation();
14507
+ source.dataset.fixedLiquidActive = 'true';
14508
+ var rect = source.getBoundingClientRect();
14509
+ var edge = liquidInteractionEdgePx();
14510
+ var float = document.createElement('div');
14511
+ float.className = 'liquid-selection-float liquid-selection-primed liquid-fixed-control-float';
14512
+ var content = document.createElement('div');
14513
+ content.className = 'liquid-fixed-control-content';
14514
+ Array.from(source.childNodes).forEach(function(node) { content.appendChild(node.cloneNode(true)); });
14515
+ float.appendChild(content);
14516
+ float.style.left = (rect.left - edge) + 'px';
14517
+ float.style.top = (rect.top - edge) + 'px';
14518
+ float.style.width = (rect.width + edge * 2) + 'px';
14519
+ float.style.height = (rect.height + edge * 2) + 'px';
14520
+ float._liquidTargetRect = { left: rect.left - edge, top: rect.top - edge, width: rect.width + edge * 2, height: rect.height + edge * 2 };
14521
+ mountLiquidViewportFloat(float);
14522
+ showLiquidViewportFloat(float);
14523
+ source.classList.add('liquid-fixed-source-covered');
14524
+ requestAnimationFrame(function() {
14525
+ if (!float.isConnected) return;
14526
+ float.classList.remove('liquid-selection-primed');
14527
+ beginLiquidSelectionLift(float);
14528
+ });
14529
+ var startX = event.clientX;
14530
+ var startY = event.clientY;
14531
+ var finishing = false;
14532
+ function move(value) {
14533
+ if (value.pointerId !== event.pointerId || !float.isConnected) return;
14534
+ var dx = value.clientX - startX;
14535
+ var dy = value.clientY - startY;
14536
+ var distance = Math.hypot(dx, dy);
14537
+ if (distance < 2) return;
14538
+ value.preventDefault();
14539
+ var resistedDistance = Math.min(4.5, Math.sqrt(distance) * .625);
14540
+ var ratio = resistedDistance / Math.max(1, distance);
14541
+ float.style.setProperty('--liquid-boundary-x', (dx * ratio).toFixed(2) + 'px');
14542
+ float.style.setProperty('--liquid-boundary-y', (dy * ratio).toFixed(2) + 'px');
14543
+ float.style.setProperty('--liquid-boundary-pull', Math.min(1, resistedDistance / 18).toFixed(3));
14544
+ }
14545
+ function finish(commit) {
14546
+ if (finishing) return;
14547
+ finishing = true;
14548
+ window.removeEventListener('pointermove', move, true);
14549
+ window.removeEventListener('pointerup', up, true);
14550
+ window.removeEventListener('pointercancel', cancel, true);
14551
+ window.removeEventListener('blur', blur, true);
14552
+ window.removeEventListener('pagehide', pagehide, true);
14553
+ float.style.setProperty('--liquid-boundary-x', '0px');
14554
+ float.style.setProperty('--liquid-boundary-y', '0px');
14555
+ float.style.setProperty('--liquid-boundary-pull', '0');
14556
+ landLiquidSelectionFloat(float, function() {
14557
+ source.classList.remove('liquid-fixed-source-covered');
14558
+ delete source.dataset.fixedLiquidActive;
14559
+ if (float._releaseKyantGlass) float._releaseKyantGlass();
14560
+ if (float.parentNode) float.parentNode.removeChild(float);
14561
+ }, function() {
14562
+ if (!commit || !source.isConnected) return;
14563
+ source.dataset.fixedLiquidReplay = 'true';
14564
+ source.click();
14565
+ });
14566
+ }
14567
+ function up(value) { if (value.pointerId === event.pointerId) finish(true); }
14568
+ function cancel(value) { if (value.pointerId === event.pointerId) finish(false); }
14569
+ function blur() { finish(false); }
14570
+ function pagehide() { finish(false); }
14571
+ window.addEventListener('pointermove', move, true);
14572
+ window.addEventListener('pointerup', up, true);
14573
+ window.addEventListener('pointercancel', cancel, true);
14574
+ window.addEventListener('blur', blur, true);
14575
+ window.addEventListener('pagehide', pagehide, true);
14576
+ setTimeout(function() {
14577
+ if (source.dataset.fixedLiquidActive !== 'true') return;
14578
+ finish(false);
14579
+ }, 1200);
14580
+ }, true);
14581
+ document.addEventListener('click', function(event) {
14582
+ var source = event.target && event.target.closest ? event.target.closest(selector) : null;
14583
+ if (!source) return;
14584
+ if (source.dataset.fixedLiquidReplay === 'true') {
14585
+ delete source.dataset.fixedLiquidReplay;
14586
+ return;
14587
+ }
14588
+ if (source.dataset.fixedLiquidActive === 'true') {
14589
+ event.preventDefault();
14590
+ event.stopImmediatePropagation();
14591
+ }
14592
+ }, true);
14593
+ }
14594
+
14208
14595
  requestAnimationFrame(function() {
14596
+ document.querySelectorAll('.liquid-click-source').forEach(function(source) {
14597
+ source.classList.remove('liquid-click-source');
14598
+ source.style.removeProperty('visibility');
14599
+ source.style.removeProperty('opacity');
14600
+ });
14601
+ document.querySelectorAll('[data-liquid-click-pending]').forEach(function(source) {
14602
+ delete source.dataset.liquidClickPending;
14603
+ });
14209
14604
  wireLiquidRailInteractions(document.getElementById('mode-toggle'), '.mode-toggle-btn[data-mode]');
14210
14605
  wireLiquidRailInteractions(document.getElementById('left-tool-surface'), '.left-nav-icon');
14211
14606
  wireLiquidRailInteractions(document.getElementById('left-thumb'), '.lt-item');
14212
14607
  wireLiquidRailInteractions(document.getElementById('left-ws-list'), '.left-ws-item');
14213
14608
  wireLiquidRailInteractions(document.getElementById('right-tabs'), '.tab-btn[data-tab]');
14609
+ wireLegacyLiquidButtons();
14610
+ wireFixedPrimaryLiquidButtons();
14214
14611
  });
14215
14612
 
14216
14613
  // Checkbox switches use one pointer-captured glass thumb that follows the
@@ -21467,9 +21864,15 @@ function followConversationDragPointer() {
21467
21864
  var minTop = firstRect.top - rowRect.height;
21468
21865
  var maxTop = Math.max(minTop, lastRect.bottom);
21469
21866
  var trackTop = Math.max(minTop, Math.min(maxTop, projectedTop));
21867
+ // Keep the reorder anchor fixed at the edge, but give a held glass float a
21868
+ // damped visual pull so blocked dragging still feels elastic and alive.
21869
+ var blockedDelta = projectedTop < minTop ? projectedTop - minTop : projectedTop > maxTop ? projectedTop - maxTop : 0;
21870
+ var resisted = Math.sign(blockedDelta) * Math.sqrt(Math.abs(blockedDelta)) * 0.6;
21470
21871
  var edge = liquidInteractionEdgePx();
21471
21872
  drag.float.style.left = (rowRect.left - edge) + 'px';
21472
21873
  drag.float.style.top = (trackTop - edge) + 'px';
21874
+ drag.float.style.setProperty('--liquid-boundary-y', resisted.toFixed(2) + 'px');
21875
+ drag.float.style.setProperty('--liquid-boundary-pull', Math.min(1, Math.abs(resisted) / 28).toFixed(3));
21473
21876
  if (drag.float._renderKyantGlass) drag.float._renderKyantGlass();
21474
21877
  }
21475
21878
 
@@ -21580,7 +21983,7 @@ window.animateConversationGlassTo = function(target, options) {
21580
21983
  requestAnimationFrame(function() {
21581
21984
  if (conversationGlassFlight.generation !== generation || !float.isConnected) return;
21582
21985
  float.classList.remove('liquid-selection-primed');
21583
- float.classList.add('visible');
21986
+ beginLiquidSelectionLift(float);
21584
21987
  place(target);
21585
21988
  });
21586
21989
  window.setLiquidSidebarGestureLock('conversation-flight', true);