File size: 10,964 Bytes
609fb78
7c1820c
609fb78
cf17b22
 
 
 
 
 
 
 
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
609fb78
 
852b0d3
609fb78
852b0d3
609fb78
852b0d3
 
7c1820c
852b0d3
 
609fb78
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
609fb78
852b0d3
 
 
 
 
 
 
 
 
 
9b857f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852b0d3
 
 
 
 
 
609fb78
852b0d3
 
609fb78
 
852b0d3
 
 
 
 
 
609fb78
 
852b0d3
 
 
 
 
 
 
 
609fb78
 
852b0d3
 
 
 
 
 
609fb78
852b0d3
 
 
9b857f7
 
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
 
852b0d3
 
 
 
 
 
 
 
609fb78
 
852b0d3
 
 
 
 
 
609fb78
 
852b0d3
 
 
2bdff0c
 
 
 
609fb78
852b0d3
609fb78
 
2bdff0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
609fb78
 
852b0d3
 
2bdff0c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
609fb78
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
/* ---------------------------------------------------------------------------
   query/query.css β€” the Query module's own stylesheet.

   The Query module IS the database module β€” `shell-db-frame` + `CustomerGrid` β€”
   so the frame, the grid and every view kind are styled by rules that already
   exist. What is left here is what this surface adds: the VIEW RAIL (owner item
   3: the AI's views, grouped by the database they read), a one-line provenance
   disclosure, and the empty state.
   ⚠ THE UNIVERSAL DATABASE HEADER IS GONE FROM THIS FRAME (owner item 7,
   W36-T67), so the rail's group heading is now the only place the source
   database is named. That is not a gap: it was always the richer of the two,
   carrying the icon as well, and the header was the copy.

   The chat rules live in `assistant/assistant.css` with the markup they style.

   EVERY FONT SIZE IS A `--lp-fs-*` TOKEN AND EVERY COLOUR A `--lp-*` TOKEN.
   Wave-21 R5 is gated app-wide over every CSS file under src, and a literal
   here reds `web_ui` for the whole tree. No emojis, no ALL-CAPS chrome
   (DESIGN.md R6).

   AND DO NOT WRITE A GLOB IN THIS COMMENT. A star-star followed by a slash
   spells the CSS COMMENT TERMINATOR β€” the comment would end in the middle of
   its own explanation and `lightningcss` would die far from the cause. Found
   by `web_build` in wave 32's QA; it blocked the deploy outright.
--------------------------------------------------------------------------- */

/* ── the workspace: rail + surface, in the database module's own geometry ─── */

.qy-workspace {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--lp-surface);
}

/* The same width and hairline `CustomerGrid`'s own views rail uses
   (`.cg-views`, index.css) β€” this rail stands in that slot, so it has to
   measure the same or Query stops looking like a database. */
.qy-rail {
  flex: 0 0 var(--lp-rail-w);
  width: var(--lp-rail-w);
  min-width: var(--lp-rail-w);
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  border-right: 1px solid var(--lp-line);
  background: var(--lp-surface);
  overflow: hidden;
}

.qy-rail-head {
  margin: 0 0 6px;
  padding: 0 6px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-xs);
  font-weight: 600;
}

.qy-rail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.qy-rail-group { margin-bottom: 10px; }

/* ── R20: the per-view menu, the same vocabulary a database view offers ───── */

.qy-rail-more {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lp-muted);
  opacity: 0;
  cursor: pointer;
}

.qy-rail-more svg { fill: currentColor; stroke: none; }

.qy-rail-row:hover .qy-rail-more,
.qy-rail-row.is-active .qy-rail-more,
.qy-rail-more:focus-visible,
.qy-rail-more[aria-expanded="true"] { opacity: 1; }

/* Sits above the rows, under the menu, so a click anywhere else closes it without every row
   needing its own outside-click listener. */
.qy-rail-scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: default;
}

/* FIXED, not absolute: its natural parent `.qy-rail-scroll` is `overflow-y: auto`, which clips
   both axes, so a menu opened on a row near the bottom of the list would render cut off or
   invisible. `top`/`right` are supplied inline from the button's own rect. */
.qy-rail-menu {
  position: fixed;
  z-index: 21;
  min-width: 168px;
  margin-top: 2px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  box-shadow: 0 6px 18px rgba(20, 24, 40, 0.12);
}

.qy-rail-item {
  display: block;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.qy-rail-item:hover { background: var(--lp-surface-2); }
.qy-rail-item.is-danger { color: var(--lp-red-deep); }

.qy-rail-edit { flex: 1 1 auto; min-width: 0; padding: 2px 4px; }

.qy-rail-input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--lp-blue-solid);
  border-radius: 6px;
  background: var(--lp-surface);
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
}

.qy-rail-note {
  flex: 1 0 100%;
  margin: 0 0 4px;
  padding: 0 10px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: var(--lp-lh);
}

.qy-rail-problem {
  margin: 0 6px 6px;
  color: var(--lp-red-deep);
  font-size: var(--lp-fs-2xs);
}

/* A confirmation, not a refusal. Same slot, different voice. */
.qy-rail-notice {
  margin: 0 6px 6px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: var(--lp-lh);
}

.qy-rail-db {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  padding: 4px 6px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-xs);
  font-weight: 600;
}

.qy-rail-db-mark {
  flex: 0 0 auto;
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--lp-muted);
}

.qy-rail-db-mark svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qy-rail-db-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qy-rail-row {
  position: relative;
  display: flex;
  /* R20's description sits on its own line under the name, so the row wraps. `position: relative`
     was already here and is what the menu anchors to. */
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  border-radius: var(--lp-r-md);
}

.qy-rail-row:hover { background: var(--lp-surface-2); }
.qy-rail-row.is-active { background: var(--lp-blue-tint); }

.qy-rail-view {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  color: var(--lp-ink);
  cursor: pointer;
}

.qy-rail-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lp-fs-xs);
  font-weight: 500;
}

.qy-rail-row.is-active .qy-rail-name { font-weight: 600; }

.qy-rail-kind {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

/* ⭐ W35-T25 (R3) β€” the Edited mark. Quiet on purpose: it reports a state the reader created
   themselves, so it belongs beside the kind rather than competing with the view's name. */
.qy-rail-edited {
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: var(--lp-r-sm);
  background: var(--lp-surface-2);
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  line-height: 15px;
}

.qy-rail-row.is-active .qy-rail-edited { background: var(--lp-surface); }

/* ── ⭐⭐ W35-T47 (R4, C2) β€” the SHARED star button, re-placed for a rail row ─────────────────
 *
 * β›” GEOMETRY ONLY. `StarButton` is B's component and `starred.css` owns everything about how it
 * looks; overriding its colour or its glyph here would be a second opinion about one mark. What a
 * rail row genuinely needs different is placement: the shared rule is `position: absolute` on a
 * TILE wrapper, and this row is a flex list whose right end already holds the actions button, so
 * an absolutely positioned star would sit on top of it.
 *
 * ⚠ AND THE REVEAL RULE HAS TO BE RESTATED, not inherited. The shared sheet reveals the star with
 * `.st-tilewrap:hover`, a wrapper that does not exist here β€” so without the row's own hover rule
 * the button would be `opacity: 0` forever except when starred or focused, i.e. a control you can
 * only find by tabbing to it. `.is-on` and `:focus-visible` keep working from the shared sheet.
 */
.qy-rail-row .st-star {
  position: static;
  transform: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 2px;
}

.qy-rail-row:hover .st-star { opacity: 1; }

/* Hover-revealed, like the grid rail's own row menu β€” visible on focus so it is
   reachable from the keyboard rather than only from a pointer. */
.qy-rail-del {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lp-muted);
  opacity: 0;
  cursor: pointer;
}

.qy-rail-del svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qy-rail-row:hover .qy-rail-del,
.qy-rail-row.is-active .qy-rail-del,
.qy-rail-del:focus-visible { opacity: 1; }

.qy-rail-confirm {
  flex: 0 0 auto;
  margin-right: 4px;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--lp-red-deep);
  color: var(--lp-surface);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.qy-rail-ask {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: var(--lp-r-md);
  color: var(--lp-blue-solid);
  font-size: var(--lp-fs-xs);
  font-weight: 600;
  text-decoration: none;
}

.qy-rail-ask:hover { background: var(--lp-surface-2); }

/* ── the surface: the grid, and nothing above it ──────────────────────────── */
/* W35-T21 (owner item 4 / R2): the `.qy-prov*` family is deleted with the component. */

.qy-surface {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.qy-grid-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}


/* ── the empty state ──────────────────────────────────────────────────────── */

.qy-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 260px;
  padding: 34px 44px;
  box-sizing: border-box;
  background: var(--lp-wash);
  text-align: center;
}

.qy-empty-h { margin: 0 0 8px; color: var(--lp-ink); font-size: var(--lp-fs-lg); font-weight: 650; }
.qy-empty-p { max-width: 58ch; margin: 0 0 18px; color: var(--lp-muted); font-size: var(--lp-fs-sm); line-height: var(--lp-lh); }
.qy-empty-go { padding: 8px 14px; border-radius: var(--lp-r-md); background: var(--lp-blue-solid); color: var(--lp-surface); font-size: var(--lp-fs-sm); font-weight: 650; text-decoration: none; }
.qy-empty-go:hover { background: var(--lp-blue-solid); }