@atolis-hq/wake 0.2.79 → 0.2.81
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.
|
@@ -103,6 +103,20 @@ export const indexHtml = `<!DOCTYPE html>
|
|
|
103
103
|
.modal-tabs .nav-button.active { color: var(--accent-light); border-bottom-color: var(--accent); }
|
|
104
104
|
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem; }
|
|
105
105
|
.modal-body h3:first-child { margin-top: 0; }
|
|
106
|
+
.event-list { display: flex; flex-direction: column; gap: 0.45rem; }
|
|
107
|
+
.event-card { background: #20242c; border: 1px solid #2c313a; border-radius: 6px; overflow: hidden; }
|
|
108
|
+
.event-card:hover { border-color: #3a4150; }
|
|
109
|
+
.event-summary { display: grid; grid-template-columns: minmax(11rem, 14rem) minmax(10rem, 1fr) minmax(8rem, 18rem) 2.4rem; gap: 0.65rem; align-items: center; width: 100%; min-height: 2.25rem; background: transparent; border: 0; color: inherit; padding: 0.45rem 0.65rem; text-align: left; cursor: pointer; font: inherit; }
|
|
110
|
+
.event-summary:hover { background: rgba(255, 255, 255, 0.03); }
|
|
111
|
+
.event-time, .event-type, .event-id, .event-direction { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
112
|
+
.event-time, .event-id { color: #9aa2ad; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.72rem; }
|
|
113
|
+
.event-type { font-weight: 650; font-size: 0.8rem; }
|
|
114
|
+
.event-direction { justify-self: end; width: 1.7rem; height: 1.7rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #151922; border: 1px solid #334155; color: var(--accent-light); font-size: 0.9rem; }
|
|
115
|
+
.event-json { display: none; position: relative; border-top: 1px solid #2c313a; background: #14171d; }
|
|
116
|
+
.event-card.expanded .event-json { display: block; }
|
|
117
|
+
.event-copy { position: absolute; top: 0.55rem; right: 0.55rem; z-index: 1; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; border-radius: 6px; padding: 0.16rem 0.48rem; cursor: pointer; font-size: 0.72rem; }
|
|
118
|
+
.event-copy:hover { border-color: var(--accent-light); background: rgba(45, 212, 191, 0.16); }
|
|
119
|
+
.event-json pre { margin: 0; padding-top: 2.35rem; border-radius: 0; background: transparent; }
|
|
106
120
|
.transcript-session { margin: 0.75rem 0; color: #9aa2ad; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.75rem; text-align: center; }
|
|
107
121
|
.transcript-entry { background: #101216; border: 1px solid #2c313a; border-radius: 6px; margin-bottom: 0.75rem; overflow: hidden; }
|
|
108
122
|
.transcript-head { color: #9aa2ad; background: #171a20; border-bottom: 1px solid #2c313a; padding: 0.45rem 0.6rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.72rem; }
|
|
@@ -114,6 +128,8 @@ export const indexHtml = `<!DOCTYPE html>
|
|
|
114
128
|
.col { min-height: unset; }
|
|
115
129
|
.col-empty { padding: 0.25rem 0.5rem; }
|
|
116
130
|
.col-empty h2 { margin: 0.1rem 0.4rem; }
|
|
131
|
+
.event-summary { grid-template-columns: minmax(8.5rem, 10rem) minmax(8rem, 1fr) 2.2rem; gap: 0.5rem; }
|
|
132
|
+
.event-id { display: none; }
|
|
117
133
|
}
|
|
118
134
|
.tiles { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
|
|
119
135
|
.tile { background: #1a1d23; border-radius: 10px; padding: 0.6rem 0.9rem; min-width: 120px; }
|
|
@@ -442,7 +458,7 @@ async function openItemModal(repo, number, boardItem) {
|
|
|
442
458
|
const detail = await ensureDetail();
|
|
443
459
|
if (!detail) return el('p', { text: 'Not found' });
|
|
444
460
|
if (tab === 'events') {
|
|
445
|
-
return
|
|
461
|
+
return renderItemEvents(detail.events || []);
|
|
446
462
|
}
|
|
447
463
|
if (tab === 'transcripts') {
|
|
448
464
|
const transcripts = await getJson('/work-items/' + encodeURIComponent(detail.item.workItemKey) + '/transcripts');
|
|
@@ -454,6 +470,81 @@ async function openItemModal(repo, number, boardItem) {
|
|
|
454
470
|
await switchItemTab('details');
|
|
455
471
|
}
|
|
456
472
|
|
|
473
|
+
function eventTimestamp(event) {
|
|
474
|
+
return event.ingestedAt || event.occurredAt || '';
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
function eventDirectionSymbol(direction) {
|
|
478
|
+
if (direction === 'inbound') return '\\u2193';
|
|
479
|
+
if (direction === 'outbound') return '\\u2191';
|
|
480
|
+
return '\\u2194';
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
function sortedEventsNewestFirst(events) {
|
|
484
|
+
return [...events].sort((left, right) => eventTimestamp(right).localeCompare(eventTimestamp(left)));
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
async function copyText(text, button) {
|
|
488
|
+
const original = button.textContent;
|
|
489
|
+
try {
|
|
490
|
+
if (navigator.clipboard && window.isSecureContext) {
|
|
491
|
+
await navigator.clipboard.writeText(text);
|
|
492
|
+
} else {
|
|
493
|
+
const input = document.createElement('textarea');
|
|
494
|
+
input.value = text;
|
|
495
|
+
input.setAttribute('readonly', 'readonly');
|
|
496
|
+
input.style.position = 'fixed';
|
|
497
|
+
input.style.top = '-1000px';
|
|
498
|
+
document.body.appendChild(input);
|
|
499
|
+
input.select();
|
|
500
|
+
document.execCommand('copy');
|
|
501
|
+
input.remove();
|
|
502
|
+
}
|
|
503
|
+
button.textContent = 'Copied';
|
|
504
|
+
} catch (err) {
|
|
505
|
+
button.textContent = 'Copy failed';
|
|
506
|
+
} finally {
|
|
507
|
+
setTimeout(() => {
|
|
508
|
+
button.textContent = original;
|
|
509
|
+
}, 1100);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
function renderItemEvents(events) {
|
|
514
|
+
if (events.length === 0) {
|
|
515
|
+
return el('p', { class: 'meta', text: 'No events available for this item.' });
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
const root = el('div', { class: 'event-list' });
|
|
519
|
+
for (const event of sortedEventsNewestFirst(events)) {
|
|
520
|
+
const json = JSON.stringify(event, null, 2);
|
|
521
|
+
const card = el('article', { class: 'event-card' });
|
|
522
|
+
const summary = el('button', { type: 'button', class: 'event-summary' }, [
|
|
523
|
+
el('span', { class: 'event-time', text: eventTimestamp(event) }),
|
|
524
|
+
el('span', { class: 'event-type', text: event.sourceEventType || 'unknown event' }),
|
|
525
|
+
el('span', { class: 'event-id', text: event.eventId || '' }),
|
|
526
|
+
el('span', { class: 'event-direction', title: event.direction || 'unknown', text: eventDirectionSymbol(event.direction) }),
|
|
527
|
+
]);
|
|
528
|
+
summary.addEventListener('click', () => {
|
|
529
|
+
card.classList.toggle('expanded');
|
|
530
|
+
summary.setAttribute('aria-expanded', String(card.classList.contains('expanded')));
|
|
531
|
+
});
|
|
532
|
+
const copyButton = el('button', { type: 'button', class: 'event-copy', text: 'Copy' });
|
|
533
|
+
copyButton.addEventListener('click', (clickEvent) => {
|
|
534
|
+
clickEvent.stopPropagation();
|
|
535
|
+
copyText(json, copyButton);
|
|
536
|
+
});
|
|
537
|
+
const jsonArea = el('div', { class: 'event-json' }, [
|
|
538
|
+
copyButton,
|
|
539
|
+
el('pre', { text: json }),
|
|
540
|
+
]);
|
|
541
|
+
card.appendChild(summary);
|
|
542
|
+
card.appendChild(jsonArea);
|
|
543
|
+
root.appendChild(card);
|
|
544
|
+
}
|
|
545
|
+
return root;
|
|
546
|
+
}
|
|
547
|
+
|
|
457
548
|
function renderItemDetails(detail, boardItem) {
|
|
458
549
|
const body = el('div');
|
|
459
550
|
const repo = detail.item.issue.repo;
|
|
@@ -1094,7 +1094,9 @@ export function createTickRunner(deps) {
|
|
|
1094
1094
|
return null;
|
|
1095
1095
|
}
|
|
1096
1096
|
async function runRunnerTick() {
|
|
1097
|
-
const lock = await acquireFileLock(deps.stateStore.paths.runnerLockFile
|
|
1097
|
+
const lock = await acquireFileLock(deps.stateStore.paths.runnerLockFile, {
|
|
1098
|
+
staleAfterMs: Math.min(runnerTimeoutMs(), 5 * 60 * 1000),
|
|
1099
|
+
});
|
|
1098
1100
|
if (!lock.acquired) {
|
|
1099
1101
|
return { status: 'locked' };
|
|
1100
1102
|
}
|
package/dist/src/version.js
CHANGED