agl 43.8.0 → 43.9.0
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/changelog.md +16 -0
- package/dist_serve/bundle.js +317 -304
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +824 -6
- package/dist_ts/aglapi/interfaces.d.ts +8 -0
- package/dist_ts/aglapi/interfaces.js +3 -1
- package/dist_ts/classes.mcpclient.js +3 -3
- package/dist_ts/classes.mcpcontrollerhost.js +3 -2
- package/dist_ts/classes.mcptools.d.ts +1 -1
- package/dist_ts/classes.mcptools.js +2 -1
- package/dist_ts/classes.ticketstore.d.ts +3 -3
- package/dist_ts/classes.ticketstore.js +23 -4
- package/dist_ts/functions.deviceapi.js +3 -1
- package/dist_ts/functions.mcptickettools.d.ts +60 -0
- package/dist_ts/functions.mcptickettools.js +4 -3
- package/dist_ts/functions.ticketcli.d.ts +4 -2
- package/dist_ts/functions.ticketcli.js +70 -4
- package/dist_ts/functions.ticketlisting.d.ts +38 -0
- package/dist_ts/functions.ticketlisting.js +211 -0
- package/dist_ts/functions.ticketvalidation.d.ts +62 -0
- package/dist_ts/functions.ticketvalidation.js +41 -3
- package/dist_ts_interfaces/mcprequests.d.ts +1 -1
- package/dist_ts_interfaces/requests.tickets.d.ts +31 -3
- package/dist_ts_interfaces/requests.tickets.js +2 -2
- package/dist_ts_interfaces/tickets.d.ts +174 -2
- package/dist_ts_interfaces/tickets.js +20 -2
- package/package.json +2 -2
- package/readme.md +31 -3
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +823 -5
- package/ts/aglapi/interfaces.ts +2 -0
- package/ts/classes.mcpclient.ts +2 -2
- package/ts/classes.mcpcontrollerhost.ts +2 -1
- package/ts/classes.mcptools.ts +1 -0
- package/ts/classes.ticketstore.ts +21 -3
- package/ts/functions.deviceapi.ts +2 -0
- package/ts/functions.mcptickettools.ts +3 -2
- package/ts/functions.ticketcli.ts +70 -5
- package/ts/functions.ticketlisting.ts +214 -0
- package/ts/functions.ticketvalidation.ts +41 -2
- package/ts_interfaces/requests.tickets.ts +32 -2
- package/ts_interfaces/tickets.ts +136 -3
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements.inbox.ts +50 -9
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type * as plugins from './plugins.js';
|
|
2
2
|
import type {
|
|
3
3
|
ITicket, ITicketAnswer, ITicketAsk, ITicketBoard, ITicketChanges, ITicketComment, ITicketCreate,
|
|
4
|
-
ITicketDetail, ITicketFilters, ITicketGet, ITicketMove, ITicketQuestion, TTicketLink, TTicketOperation, TTicketReferenceContent, TTicketRequest,
|
|
4
|
+
ITicketDetail, ITicketFilters, ITicketGet, ITicketMove, ITicketOverview, ITicketOverviewRequest, ITicketPageRequest, TTicketPage, ITicketQuestion, TTicketLink, TTicketOperation, TTicketReferenceContent, TTicketRequest,
|
|
5
5
|
TTicketResponse,
|
|
6
6
|
} from './tickets.js';
|
|
7
7
|
|
|
8
8
|
export const controllerMcpTicketMethods = [
|
|
9
|
-
'agl.mcp.ticket.list', 'agl.mcp.ticket.board', 'agl.mcp.ticket.search', 'agl.mcp.ticket.get',
|
|
9
|
+
'agl.mcp.ticket.list', 'agl.mcp.ticket.page', 'agl.mcp.ticket.overview', 'agl.mcp.ticket.board', 'agl.mcp.ticket.search', 'agl.mcp.ticket.get',
|
|
10
10
|
'agl.mcp.ticket.comments', 'agl.mcp.ticket.create', 'agl.mcp.ticket.update',
|
|
11
11
|
'agl.mcp.ticket.move', 'agl.mcp.ticket.comment', 'agl.mcp.ticket.link', 'agl.mcp.ticket.unlink',
|
|
12
12
|
'agl.mcp.ticket.ask', 'agl.mcp.ticket.answer',
|
|
@@ -45,6 +45,34 @@ export interface IReq_ControllerMcpTicketList extends plugins.typedrequestInterf
|
|
|
45
45
|
request: ITicketFilters & { ownerToken?: string };
|
|
46
46
|
response: { tickets: ITicket[] };
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Lists the board in pages of `limit` tickets (1 to 200, default 50, within 256 KiB), as summaries without
|
|
50
|
+
* description and source words unless `view` is `full`. Beyond the filters of the whole listing it narrows by
|
|
51
|
+
* `statuses`, `open`, `kind`, `priorities`, `parent` (direct children), `assignee` (a person or session id),
|
|
52
|
+
* `unassigned`, `keys` and `updatedSince`, and sorts by `board`, `updated`, `created` or `priority`. `total` and
|
|
53
|
+
* `columns` count everything the filters match. `nextCursor` continues with the same filters, sort and view;
|
|
54
|
+
* `moved` tells that the board changed since the first page.
|
|
55
|
+
*/
|
|
56
|
+
export interface IReq_ControllerMcpTicketPage extends plugins.typedrequestInterfaces.implementsTR<
|
|
57
|
+
TControllerMcpTicketRequest<'page'>, IReq_ControllerMcpTicketPage
|
|
58
|
+
> {
|
|
59
|
+
method: 'agl.mcp.ticket.page';
|
|
60
|
+
request: ITicketPageRequest & { ownerToken?: string };
|
|
61
|
+
response: TTicketPage;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Reads the board at a glance without any ticket's texts: counts by column, priority, AutoLabel, project and
|
|
65
|
+
* assignee, each open epic's progress, the tickets that need someone (urgent, needs input, open questions,
|
|
66
|
+
* review, ready without an assignee, stale) and the tickets changed last. Lists hold at most `limit` tickets and
|
|
67
|
+
* carry the count of all they stand for.
|
|
68
|
+
*/
|
|
69
|
+
export interface IReq_ControllerMcpTicketOverview extends plugins.typedrequestInterfaces.implementsTR<
|
|
70
|
+
TControllerMcpTicketRequest<'overview'>, IReq_ControllerMcpTicketOverview
|
|
71
|
+
> {
|
|
72
|
+
method: 'agl.mcp.ticket.overview';
|
|
73
|
+
request: ITicketOverviewRequest & { ownerToken?: string };
|
|
74
|
+
response: ITicketOverview;
|
|
75
|
+
}
|
|
48
76
|
/** Reads the board: its columns, the tickets the filters match, and the caller as `viewer`. */
|
|
49
77
|
export interface IReq_ControllerMcpTicketBoard extends plugins.typedrequestInterfaces.implementsTR<
|
|
50
78
|
TControllerMcpTicketRequest<'board'>, IReq_ControllerMcpTicketBoard
|
|
@@ -179,6 +207,8 @@ export interface IReq_ControllerMcpTicketAnswer extends plugins.typedrequestInte
|
|
|
179
207
|
}
|
|
180
208
|
export type TControllerMcpTicketTypedRequest =
|
|
181
209
|
| IReq_ControllerMcpTicketList
|
|
210
|
+
| IReq_ControllerMcpTicketPage
|
|
211
|
+
| IReq_ControllerMcpTicketOverview
|
|
182
212
|
| IReq_ControllerMcpTicketBoard
|
|
183
213
|
| IReq_ControllerMcpTicketSearch
|
|
184
214
|
| IReq_ControllerMcpTicketGet
|
package/ts_interfaces/tickets.ts
CHANGED
|
@@ -6,7 +6,8 @@ export type TTicketColumn = (typeof ticketColumns)[number];
|
|
|
6
6
|
/** The columns of finished work; the board folds them. */
|
|
7
7
|
export const ticketDoneColumns: readonly TTicketColumn[] = ['released', 'closed'];
|
|
8
8
|
export type TTicketKind = 'epic' | 'task' | 'subtask';
|
|
9
|
-
export
|
|
9
|
+
export const ticketPriorities = ['urgent', 'high', 'normal', 'low', 'none'] as const;
|
|
10
|
+
export type TTicketPriority = (typeof ticketPriorities)[number];
|
|
10
11
|
export interface ITicketPerson {
|
|
11
12
|
id: string;
|
|
12
13
|
name: string;
|
|
@@ -221,6 +222,127 @@ export interface ITicketFilters {
|
|
|
221
222
|
label?: string;
|
|
222
223
|
text?: string;
|
|
223
224
|
}
|
|
225
|
+
/** How a page sorts: the board's own order, newest change first, newest ticket first, or urgent first and then the board's order. */
|
|
226
|
+
export const ticketPageSorts = ['board', 'updated', 'created', 'priority'] as const;
|
|
227
|
+
export type TTicketPageSort = (typeof ticketPageSorts)[number];
|
|
228
|
+
/**
|
|
229
|
+
* How many tickets one page returns unless it names `limit`, the most it may name, and the bytes a page holds at most
|
|
230
|
+
* (its tickets serialized; a page holds at least one ticket). The budget wins over `limit`.
|
|
231
|
+
*/
|
|
232
|
+
export const ticketListPage = { default: 50, maximum: 200, bytes: 256 * 1024 } as const;
|
|
233
|
+
/**
|
|
234
|
+
* One page of the board. Beyond a listing's filters it narrows by several columns (`statuses`), by open work (`open`:
|
|
235
|
+
* true leaves out released and closed tickets, false keeps only those), kind, priorities, a parent's direct children,
|
|
236
|
+
* an assignee (a person id or a session id), tickets without one, named keys and a time of last change.
|
|
237
|
+
*/
|
|
238
|
+
export interface ITicketPageRequest extends ITicketFilters {
|
|
239
|
+
statuses?: TTicketColumn[];
|
|
240
|
+
open?: boolean;
|
|
241
|
+
kind?: TTicketKind;
|
|
242
|
+
priorities?: TTicketPriority[];
|
|
243
|
+
/** A ticket key: its direct children, as the board's epic filter matches them. */
|
|
244
|
+
parent?: string;
|
|
245
|
+
/** A person id or a session id (`harness:nativeId`), as a ticket's assignee holds them; never a display name. */
|
|
246
|
+
assignee?: string;
|
|
247
|
+
unassigned?: boolean;
|
|
248
|
+
/** Up to 200 keys: reads those tickets in one call. */
|
|
249
|
+
keys?: string[];
|
|
250
|
+
/** An ISO 8601 instant: tickets changed at or after it. */
|
|
251
|
+
updatedSince?: string;
|
|
252
|
+
/** `board` when absent. */
|
|
253
|
+
sort?: TTicketPageSort;
|
|
254
|
+
/** `summary` (a ticket without its texts) when absent; `full` returns whole tickets. */
|
|
255
|
+
view?: 'summary' | 'full';
|
|
256
|
+
/** Tickets on the page, 1 to 200 (`ticketListPage.maximum`); 50 when absent. */
|
|
257
|
+
limit?: number;
|
|
258
|
+
/** A page's `nextCursor`, with the same filters, sort and view. */
|
|
259
|
+
cursor?: string;
|
|
260
|
+
}
|
|
261
|
+
/** A ticket without its description, source words and link details. Empty fields are left out. */
|
|
262
|
+
export interface ITicketSummary {
|
|
263
|
+
key: string;
|
|
264
|
+
revision: number;
|
|
265
|
+
project: string;
|
|
266
|
+
kind: TTicketKind;
|
|
267
|
+
title: string;
|
|
268
|
+
columnId: TTicketColumn;
|
|
269
|
+
priority: TTicketPriority;
|
|
270
|
+
updatedAt: string;
|
|
271
|
+
assignee?: Pick<ITicketPerson, 'id' | 'name' | 'sessionId'>;
|
|
272
|
+
parentId?: string;
|
|
273
|
+
labels?: string[];
|
|
274
|
+
autoLabels?: TTicketAutoLabel[];
|
|
275
|
+
/** How many links of each kind the ticket holds. */
|
|
276
|
+
links?: Partial<Record<TTicketLink['kind'], number>>;
|
|
277
|
+
releasePlan?: ITicketReleasePlan;
|
|
278
|
+
deployPlan?: ITicketDeployPlanInput;
|
|
279
|
+
maintenanceWindow?: Pick<ITicketMaintenanceWindow, 'from' | 'to' | 'targets'>;
|
|
280
|
+
/** Unanswered questions on the ticket. */
|
|
281
|
+
openQuestions?: number;
|
|
282
|
+
}
|
|
283
|
+
interface ITicketPageBase {
|
|
284
|
+
/** How many tickets the filters match, on every page. */
|
|
285
|
+
total: number;
|
|
286
|
+
/** How many of them each column holds; a column without any is left out. */
|
|
287
|
+
columns: Partial<Record<TTicketColumn, number>>;
|
|
288
|
+
/** The board revision this page was read at. */
|
|
289
|
+
revision: number;
|
|
290
|
+
/** Present while more tickets follow: pass it as `cursor` with the same filters, sort and view. */
|
|
291
|
+
nextCursor?: string;
|
|
292
|
+
/**
|
|
293
|
+
* The board changed since the first page of this cursor. A page continues after the last ticket shown as the board
|
|
294
|
+
* stands now, so a ticket that changed its place meanwhile may be missing or shown twice; list again for an exact reading.
|
|
295
|
+
*/
|
|
296
|
+
moved?: true;
|
|
297
|
+
}
|
|
298
|
+
export type TTicketPage = (ITicketPageBase & { view: 'summary'; tickets: ITicketSummary[] })
|
|
299
|
+
| (ITicketPageBase & { view: 'full'; tickets: ITicket[] });
|
|
300
|
+
/** The overview's defaults: tickets per list, the days after which active work counts as stale, and the most projects, assignees and epics listed. */
|
|
301
|
+
export const ticketOverviewDefaults = { limit: 5, maximumLimit: 50, staleDays: 3, groups: 50 } as const;
|
|
302
|
+
export interface ITicketOverviewRequest {
|
|
303
|
+
/** Only this project's tickets. */
|
|
304
|
+
project?: string;
|
|
305
|
+
/** Only the tickets assigned to the caller's verified session. */
|
|
306
|
+
mine?: boolean;
|
|
307
|
+
/** Tickets per list, 1 to 50; 5 when absent. */
|
|
308
|
+
limit?: number;
|
|
309
|
+
/** Days without a change after which in_progress, needs_input and review work counts as stale, 1 to 365; 3 when absent. */
|
|
310
|
+
staleDays?: number;
|
|
311
|
+
}
|
|
312
|
+
/** Some tickets of a kind and how many there are in all. */
|
|
313
|
+
export interface ITicketOverviewGroup { total: number; tickets: ITicketSummary[] }
|
|
314
|
+
/** The board at a glance, without any ticket's texts; see `ticketOverview`. */
|
|
315
|
+
export interface ITicketOverview {
|
|
316
|
+
revision: number;
|
|
317
|
+
total: number;
|
|
318
|
+
/** Tickets that are neither released nor closed. */
|
|
319
|
+
open: number;
|
|
320
|
+
columns: Record<TTicketColumn, number>;
|
|
321
|
+
/** Open tickets by priority. */
|
|
322
|
+
priorities: Record<TTicketPriority, number>;
|
|
323
|
+
autoLabels: Record<TTicketAutoLabel, number>;
|
|
324
|
+
/** Most open work first; `projectsTotal` counts all. */
|
|
325
|
+
projects: { project: string; total: number; open: number; columns: Partial<Record<TTicketColumn, number>> }[];
|
|
326
|
+
projectsTotal: number;
|
|
327
|
+
/** Who holds open tickets, most first; `assigneesTotal` counts all. */
|
|
328
|
+
assignees: (Pick<ITicketPerson, 'id' | 'name' | 'sessionId'> & { open: number; columns: Partial<Record<TTicketColumn, number>> })[];
|
|
329
|
+
assigneesTotal: number;
|
|
330
|
+
unassignedOpen: number;
|
|
331
|
+
/** Open epics with their direct children: how many, how many done, and where they stand; `epicsTotal` counts all. */
|
|
332
|
+
epics: { key: string; title: string; project: string; columnId: TTicketColumn; children: number; done: number;
|
|
333
|
+
columns: Partial<Record<TTicketColumn, number>> }[];
|
|
334
|
+
epicsTotal: number;
|
|
335
|
+
attention: {
|
|
336
|
+
urgent: ITicketOverviewGroup;
|
|
337
|
+
needsInput: ITicketOverviewGroup;
|
|
338
|
+
openQuestions: ITicketOverviewGroup;
|
|
339
|
+
review: ITicketOverviewGroup;
|
|
340
|
+
unassignedReady: ITicketOverviewGroup;
|
|
341
|
+
stale: ITicketOverviewGroup;
|
|
342
|
+
};
|
|
343
|
+
/** The tickets changed last, newest first. */
|
|
344
|
+
recent: ITicketSummary[];
|
|
345
|
+
}
|
|
224
346
|
export interface ITicketChanges {
|
|
225
347
|
title?: string;
|
|
226
348
|
description?: string;
|
|
@@ -297,6 +419,9 @@ export interface ITicketBoard {
|
|
|
297
419
|
}
|
|
298
420
|
export interface ITicketOperations {
|
|
299
421
|
list: { request: ITicketFilters; response: { tickets: ITicket[] } };
|
|
422
|
+
/** `list` in pages, as summaries unless `view` is `full`, with further filters and a sort. */
|
|
423
|
+
page: { request: ITicketPageRequest; response: TTicketPage };
|
|
424
|
+
overview: { request: ITicketOverviewRequest; response: ITicketOverview };
|
|
300
425
|
board: { request: ITicketFilters; response: ITicketBoard };
|
|
301
426
|
search: { request: { query: string; label?: string }; response: { tickets: ITicket[] } };
|
|
302
427
|
get: { request: ITicketGet; response: ITicketDetail };
|
|
@@ -370,6 +495,14 @@ export const ticketErrorMessages = {
|
|
|
370
495
|
ticket_question_answered: 'The question already has a different answer; a second answer is refused. Ask a new question instead.',
|
|
371
496
|
ticket_answer_invalid: 'An answer chooses existing option ids (one unless multiSelect) and/or gives free text where the question allows it.',
|
|
372
497
|
} as const;
|
|
373
|
-
|
|
374
|
-
|
|
498
|
+
/**
|
|
499
|
+
* What a page refuses about its cursor. Kept apart from `ticketErrorMessages`, which the device contract lists code by
|
|
500
|
+
* code: a device pages nothing, and is answered `invalid_request` should it ever meet one.
|
|
501
|
+
*/
|
|
502
|
+
export const ticketPageErrorMessages = {
|
|
503
|
+
ticket_cursor_invalid: 'The cursor is not the nextCursor of a ticket page; list again without cursor.',
|
|
504
|
+
ticket_cursor_mismatch: 'The cursor pages other filters, another sort or another view; repeat those or list again without cursor.',
|
|
505
|
+
} as const;
|
|
506
|
+
export type TTicketClientErrorCode = Uppercase<keyof typeof ticketErrorMessages | keyof typeof ticketPageErrorMessages>;
|
|
507
|
+
export const ticketClientErrorMessages = Object.fromEntries(Object.entries({ ...ticketErrorMessages, ...ticketPageErrorMessages })
|
|
375
508
|
.map(([codeArg, messageArg]) => [codeArg.toUpperCase(), messageArg])) as Record<TTicketClientErrorCode, string>;
|
package/ts_web/elements.inbox.ts
CHANGED
|
@@ -102,14 +102,23 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
102
102
|
private unsubscribe: (() => void) | undefined;
|
|
103
103
|
private subscribedFeed: InboxFeed | undefined;
|
|
104
104
|
private ageTimer: ReturnType<typeof setInterval> | undefined;
|
|
105
|
+
/** The item the detail showed at the last render. */
|
|
106
|
+
private detailShownId = '';
|
|
107
|
+
/** The list and the detail's body scroll on their own; each fades toward an edge past which more lies. */
|
|
108
|
+
private readonly listEdges = new plugins.deesCatalog.ScrollEdgeShadowController(this,
|
|
109
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.list'));
|
|
110
|
+
private readonly detailEdges = new plugins.deesCatalog.ScrollEdgeShadowController(this,
|
|
111
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.detailBody'));
|
|
105
112
|
|
|
106
113
|
public static styles = [
|
|
107
114
|
plugins.deesElement.cssManager.defaultStyles,
|
|
108
115
|
plugins.deesCatalog.themeDefaultStyles,
|
|
116
|
+
plugins.deesCatalog.scrollEdgeFadeStyles,
|
|
109
117
|
css`
|
|
110
|
-
|
|
118
|
+
/* The view itself never scrolls: the list and the detail's body are the two scrollers, each with its own edge fade. */
|
|
119
|
+
:host { display: block; height: 100%; min-height: 0; overflow: hidden; container-type: inline-size; }
|
|
111
120
|
.page { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 16px; padding: 20px; max-width: 1400px; margin: 0 auto;
|
|
112
|
-
|
|
121
|
+
height: 100%; box-sizing: border-box; }
|
|
113
122
|
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
|
|
114
123
|
h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--dees-color-text-primary); }
|
|
115
124
|
.subtitle { margin: 4px 0 0; font-size: 13px; color: var(--dees-color-text-secondary); }
|
|
@@ -117,8 +126,11 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
117
126
|
.search { width: 240px; }
|
|
118
127
|
.notes:empty { display: none; }
|
|
119
128
|
.notes { display: grid; gap: 8px; }
|
|
120
|
-
.split { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
|
|
121
|
-
|
|
129
|
+
.split { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 16px;
|
|
130
|
+
align-items: start; min-height: 0; }
|
|
131
|
+
/* The padding keeps a row's focus ring inside the scroller, which clips what leaves it. */
|
|
132
|
+
.list { display: grid; gap: 6px; align-content: start; max-height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
|
|
133
|
+
padding: 3px; margin: -3px; }
|
|
122
134
|
.row { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px; text-align: left; font: inherit;
|
|
123
135
|
color: var(--dees-color-text-primary); background: var(--dees-color-bg-secondary); border: 1px solid var(--dees-color-border-subtle);
|
|
124
136
|
border-radius: 10px; cursor: pointer; }
|
|
@@ -141,14 +153,16 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
141
153
|
.title { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
|
|
142
154
|
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--dees-color-text-secondary);
|
|
143
155
|
overflow-wrap: anywhere; }
|
|
144
|
-
.detail { display:
|
|
156
|
+
.detail { display: flex; flex-direction: column; max-height: 100%; min-height: 0; box-sizing: border-box; min-width: 0; background: var(--dees-color-bg-secondary); border: 1px solid var(--dees-color-border-subtle);
|
|
145
157
|
border-radius: 12px; overflow: hidden; }
|
|
158
|
+
.detailHead, .detailFoot { flex: none; }
|
|
146
159
|
.detailHead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px;
|
|
147
160
|
border-bottom: 1px solid var(--dees-color-border-subtle); }
|
|
148
161
|
.detailWhat { flex: 1; min-width: 0; display: grid; gap: 2px; }
|
|
149
162
|
.detailKind { margin: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
|
|
150
163
|
.detailMeta { margin: 0; font-size: 12px; color: var(--dees-color-text-secondary); }
|
|
151
|
-
.detailBody { display: grid; gap: 14px; padding: 16px; min-width: 0;
|
|
164
|
+
.detailBody { display: grid; gap: 14px; align-content: start; padding: 16px; min-width: 0; flex: 0 1 auto; min-height: 0; overflow-y: auto;
|
|
165
|
+
overscroll-behavior: contain; }
|
|
152
166
|
.detailTitle { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
|
|
153
167
|
.line { margin: 0; padding: 10px 12px; border-left: 3px solid var(--dees-color-accent-warning); background: var(--dees-color-fill-tertiary);
|
|
154
168
|
border-radius: 6px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
@@ -160,7 +174,14 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
160
174
|
.nothingShown { margin: 0; padding: 12px; font-size: 13px; color: var(--dees-color-text-secondary); }
|
|
161
175
|
.emptyCard { align-self: start; padding: 40px 24px; background: var(--dees-color-bg-secondary);
|
|
162
176
|
border: 1px solid var(--dees-color-border-subtle); border-radius: 12px; }
|
|
163
|
-
|
|
177
|
+
/* One column, by the view's own width (a sidebar may stand beside it): the list keeps at most two fifths of the
|
|
178
|
+
height above the detail, and both still scroll on their own. */
|
|
179
|
+
@container (max-width: 900px) {
|
|
180
|
+
.split { display: flex; flex-direction: column; align-items: stretch; }
|
|
181
|
+
.list { flex: 0 1 auto; max-height: 40%; }
|
|
182
|
+
.detail { flex: 0 1 auto; max-height: none; }
|
|
183
|
+
.search { width: 100%; }
|
|
184
|
+
}
|
|
164
185
|
@media (max-width: 600px) { .page { padding: 12px; gap: 12px; } h2 { font-size: 19px; } }
|
|
165
186
|
`,
|
|
166
187
|
];
|
|
@@ -171,6 +192,26 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
171
192
|
this.ageTimer ??= setInterval(() => { this.now = Date.now(); }, 30_000);
|
|
172
193
|
}
|
|
173
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Another item took the detail: its body starts at its top, and the item's row is brought into the list's view. Only
|
|
197
|
+
* the list is moved, never by `scrollIntoView`, which would also scroll the view's own clipped box.
|
|
198
|
+
*/
|
|
199
|
+
protected updated(changedArg: Map<PropertyKey, unknown>): void {
|
|
200
|
+
super.updated(changedArg);
|
|
201
|
+
const shownId = this.shadowRoot?.querySelector<HTMLElement>('.detail')?.dataset.detail ?? '';
|
|
202
|
+
if (shownId === this.detailShownId) return;
|
|
203
|
+
this.detailShownId = shownId;
|
|
204
|
+
const body = this.shadowRoot?.querySelector<HTMLElement>('.detailBody');
|
|
205
|
+
if (body) body.scrollTop = 0;
|
|
206
|
+
const list = this.shadowRoot?.querySelector<HTMLElement>('.list');
|
|
207
|
+
const row = list?.querySelector<HTMLElement>('.row.selected');
|
|
208
|
+
if (!list || !row) return;
|
|
209
|
+
const listBox = list.getBoundingClientRect();
|
|
210
|
+
const rowBox = row.getBoundingClientRect();
|
|
211
|
+
if (rowBox.top < listBox.top) list.scrollTop -= listBox.top - rowBox.top + 3;
|
|
212
|
+
else if (rowBox.bottom > listBox.bottom) list.scrollTop += rowBox.bottom - listBox.bottom + 3;
|
|
213
|
+
}
|
|
214
|
+
|
|
174
215
|
public async disconnectedCallback(): Promise<void> {
|
|
175
216
|
this.unsubscribe?.();
|
|
176
217
|
this.unsubscribe = undefined;
|
|
@@ -284,7 +325,7 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
284
325
|
const item = this.shownItem();
|
|
285
326
|
return html`
|
|
286
327
|
<div class="split">
|
|
287
|
-
<div class
|
|
328
|
+
<div class=${`list ${this.listEdges.fadeClasses()}`} role="list" aria-label="What waits for you">
|
|
288
329
|
${shown.length === 0 ? html`<p class="nothingShown">Nothing that waits matches.</p>` : shown.map((itemArg) => this.renderRow(itemArg, itemArg.id === item?.id))}
|
|
289
330
|
</div>
|
|
290
331
|
${item ? this.renderDetail(item) : ''}
|
|
@@ -336,7 +377,7 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
336
377
|
${inboxOpenLabel(itemArg)} <dees-icon icon="lucide:ExternalLink" iconSize="13"></dees-icon>
|
|
337
378
|
</dees-button>`}
|
|
338
379
|
</header>
|
|
339
|
-
<div class
|
|
380
|
+
<div class=${`detailBody ${this.detailEdges.fadeClasses()}`}>
|
|
340
381
|
${this.cardShowsTitle(itemArg) ? '' : html`<h3 class="detailTitle">${itemArg.title}</h3>`}
|
|
341
382
|
${this.renderBody(itemArg, state)}
|
|
342
383
|
</div>
|