@firstpick/pi-package-webui 0.7.7 → 0.7.8

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.
@@ -0,0 +1,443 @@
1
+ const CATEGORY_DEFINITIONS = Object.freeze([
2
+ { id: "feature", label: "Feature" },
3
+ { id: "bug", label: "Bug" },
4
+ { id: "ux", label: "UX" },
5
+ { id: "documentation", label: "Documentation" },
6
+ { id: "performance", label: "Performance" },
7
+ { id: "compatibility", label: "Compatibility" },
8
+ { id: "other", label: "Other" },
9
+ ]);
10
+
11
+ const TEMPLATE_DEFINITIONS = Object.freeze([
12
+ {
13
+ id: "feature-new-capability",
14
+ categoryIds: ["feature"],
15
+ label: "New capability",
16
+ description: "Propose a focused capability and define the outcome and acceptance boundary.",
17
+ fields: [
18
+ { id: "desiredOutcome", label: "Desired outcome", kind: "textarea", required: true },
19
+ {
20
+ id: "userImpact",
21
+ label: "Who benefits?",
22
+ kind: "select",
23
+ required: true,
24
+ options: [
25
+ { id: "all-users", label: "All users" },
26
+ { id: "new-users", label: "New users" },
27
+ { id: "advanced-users", label: "Advanced users" },
28
+ { id: "maintainers", label: "Maintainers" },
29
+ ],
30
+ },
31
+ { id: "acceptanceCriteria", label: "Acceptance criteria", kind: "textarea", required: true },
32
+ ],
33
+ },
34
+ {
35
+ id: "bug-defect-report",
36
+ categoryIds: ["bug"],
37
+ label: "Defect report",
38
+ description: "Report reproducible behavior that differs from the expected WebUI experience.",
39
+ fields: [
40
+ {
41
+ id: "severity",
42
+ label: "Severity",
43
+ kind: "choices",
44
+ required: true,
45
+ options: [
46
+ { id: "low", label: "Low — workaround available" },
47
+ { id: "medium", label: "Medium — degraded workflow" },
48
+ { id: "high", label: "High — key workflow blocked" },
49
+ ],
50
+ },
51
+ { id: "expectedBehavior", label: "Expected behavior", kind: "textarea", required: true },
52
+ { id: "actualBehavior", label: "Actual behavior", kind: "textarea", required: true },
53
+ { id: "reproductionSteps", label: "Steps to reproduce", kind: "textarea", required: true },
54
+ ],
55
+ },
56
+ {
57
+ id: "ux-interaction-improvement",
58
+ categoryIds: ["ux"],
59
+ label: "Interaction improvement",
60
+ description: "Describe a usability, workflow, onboarding, or accessibility improvement.",
61
+ fields: [
62
+ {
63
+ id: "affectedWorkflow",
64
+ label: "Affected workflow",
65
+ kind: "select",
66
+ required: true,
67
+ options: [
68
+ { id: "first-use", label: "First use or onboarding" },
69
+ { id: "daily-use", label: "Daily use" },
70
+ { id: "configuration", label: "Configuration" },
71
+ { id: "accessibility", label: "Accessibility" },
72
+ ],
73
+ },
74
+ { id: "currentExperience", label: "Current experience", kind: "textarea", required: true },
75
+ { id: "proposedExperience", label: "Proposed experience", kind: "textarea", required: true },
76
+ ],
77
+ },
78
+ {
79
+ id: "documentation-update",
80
+ categoryIds: ["documentation"],
81
+ label: "Documentation update",
82
+ description: "Identify missing or unclear guidance and the documentation change needed.",
83
+ fields: [
84
+ {
85
+ id: "documentationArea",
86
+ label: "Documentation area",
87
+ kind: "select",
88
+ required: true,
89
+ options: [
90
+ { id: "readme", label: "README or getting started" },
91
+ { id: "reference", label: "Reference documentation" },
92
+ { id: "examples", label: "Examples" },
93
+ { id: "troubleshooting", label: "Troubleshooting" },
94
+ ],
95
+ },
96
+ { id: "documentationGap", label: "What is missing or unclear?", kind: "textarea", required: true },
97
+ { id: "proposedChange", label: "Proposed change", kind: "textarea", required: true },
98
+ ],
99
+ },
100
+ {
101
+ id: "performance-regression",
102
+ categoryIds: ["performance"],
103
+ label: "Performance regression",
104
+ description: "Capture a measurable slowdown or resource-use regression and its impact.",
105
+ fields: [
106
+ {
107
+ id: "performanceArea",
108
+ label: "Affected area",
109
+ kind: "select",
110
+ required: true,
111
+ options: [
112
+ { id: "startup", label: "Startup" },
113
+ { id: "interaction", label: "Interaction or rendering" },
114
+ { id: "resource-use", label: "Resource use" },
115
+ { id: "background-work", label: "Background work" },
116
+ ],
117
+ },
118
+ { id: "observedPerformance", label: "Observed performance", kind: "textarea", required: true },
119
+ { id: "impact", label: "User impact", kind: "textarea", required: true },
120
+ { id: "measurement", label: "Measurement or comparison", kind: "textarea", required: true },
121
+ ],
122
+ },
123
+ {
124
+ id: "compatibility-environment-issue",
125
+ categoryIds: ["compatibility"],
126
+ label: "Environment issue",
127
+ description: "Report behavior tied to a browser, operating system, runtime, or integration.",
128
+ fields: [
129
+ {
130
+ id: "environmentType",
131
+ label: "Environment type",
132
+ kind: "choices",
133
+ required: true,
134
+ options: [
135
+ { id: "browser", label: "Browser" },
136
+ { id: "operating-system", label: "Operating system" },
137
+ { id: "runtime", label: "Runtime or package version" },
138
+ { id: "integration", label: "Integration" },
139
+ ],
140
+ },
141
+ { id: "environment", label: "Environment details", kind: "textarea", required: true },
142
+ { id: "expectedBehavior", label: "Expected behavior", kind: "textarea", required: true },
143
+ { id: "actualBehavior", label: "Actual behavior", kind: "textarea", required: true },
144
+ ],
145
+ },
146
+ {
147
+ id: "other-general-request",
148
+ categoryIds: ["other"],
149
+ label: "General request",
150
+ description: "Share a question, idea, or feedback that does not fit another category.",
151
+ fields: [
152
+ { id: "requestType", label: "Request type", kind: "choices", required: true, options: [
153
+ { id: "question", label: "Question" },
154
+ { id: "idea", label: "Idea" },
155
+ { id: "feedback", label: "Feedback" },
156
+ ] },
157
+ { id: "context", label: "Context", kind: "textarea", required: true },
158
+ { id: "request", label: "Request", kind: "textarea", required: true },
159
+ ],
160
+ },
161
+ ]);
162
+
163
+ export const ISSUE_WIZARD_STEP_COUNT = 5;
164
+ export const ISSUE_WIZARD_CATEGORIES = CATEGORY_DEFINITIONS;
165
+ export const ISSUE_WIZARD_TEMPLATES = TEMPLATE_DEFINITIONS;
166
+
167
+ function freezeCatalogEntry(entry) {
168
+ const options = entry.options?.map((option) => Object.freeze({ ...option }));
169
+ return Object.freeze({
170
+ ...entry,
171
+ ...(options ? { options: Object.freeze(options) } : {}),
172
+ });
173
+ }
174
+
175
+ function freezeTemplate(template) {
176
+ return Object.freeze({
177
+ ...template,
178
+ categoryIds: Object.freeze([...template.categoryIds]),
179
+ fields: Object.freeze(template.fields.map(freezeCatalogEntry)),
180
+ });
181
+ }
182
+
183
+ const FROZEN_CATEGORIES = Object.freeze(CATEGORY_DEFINITIONS.map((category) => Object.freeze({ ...category })));
184
+ const FROZEN_TEMPLATES = Object.freeze(TEMPLATE_DEFINITIONS.map(freezeTemplate));
185
+
186
+ function normalizedText(value, { multiline = true } = {}) {
187
+ const text = String(value ?? "")
188
+ .normalize("NFKC")
189
+ .replace(/\r\n?/g, "\n")
190
+ .replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, "");
191
+ if (!multiline) return text.replace(/\s+/g, " ").trim();
192
+ return text.split("\n").map((line) => line.trimEnd()).join("\n").trim();
193
+ }
194
+
195
+ /** Normalize prose before validation or serialization without interpreting it as Markdown. */
196
+ export function normalizeIssueText(value, options) {
197
+ return normalizedText(value, options);
198
+ }
199
+
200
+ function normalizedTitleSummary(value) {
201
+ return normalizedText(value, { multiline: false }).replace(/[\[\]]/g, "").trim();
202
+ }
203
+
204
+ function componentSlug(label) {
205
+ return normalizedText(label, { multiline: false })
206
+ .toLowerCase()
207
+ .replace(/[^a-z0-9]+/g, "-")
208
+ .replace(/^-+|-+$/g, "") || "feature";
209
+ }
210
+
211
+ /**
212
+ * Builds the complete deterministic catalog. Optional feature labels are caller-owned
213
+ * input so this module never maintains a second optional-feature catalog.
214
+ */
215
+ export function createIssueWizardCatalog(optionalFeatureNames = []) {
216
+ const labels = Array.isArray(optionalFeatureNames) ? optionalFeatureNames : [];
217
+ const seenLabels = new Set(["webui"]);
218
+ const usedIds = new Set(["webui"]);
219
+ const optionalComponents = [];
220
+
221
+ for (const featureName of labels) {
222
+ const label = normalizedText(featureName, { multiline: false });
223
+ const labelKey = label.toLocaleLowerCase();
224
+ if (!label || seenLabels.has(labelKey)) continue;
225
+ seenLabels.add(labelKey);
226
+ const baseId = `feature-${componentSlug(label)}`;
227
+ let id = baseId;
228
+ let suffix = 2;
229
+ while (usedIds.has(id)) id = `${baseId}-${suffix++}`;
230
+ usedIds.add(id);
231
+ optionalComponents.push(Object.freeze({ id, label, source: "optional-feature" }));
232
+ }
233
+
234
+ return Object.freeze({
235
+ categories: FROZEN_CATEGORIES,
236
+ components: Object.freeze([
237
+ Object.freeze({ id: "webui", label: "WebUI", source: "webui" }),
238
+ ...optionalComponents,
239
+ ]),
240
+ templates: FROZEN_TEMPLATES,
241
+ });
242
+ }
243
+
244
+ export function createIssueWizardState() {
245
+ return {
246
+ step: 1,
247
+ categoryId: "",
248
+ componentId: "",
249
+ templateId: "",
250
+ summary: "",
251
+ fields: {},
252
+ };
253
+ }
254
+
255
+ function categoryFor(catalog, id) {
256
+ return catalog?.categories?.find((category) => category.id === id) || null;
257
+ }
258
+
259
+ function componentFor(catalog, id) {
260
+ return catalog?.components?.find((component) => component.id === id) || null;
261
+ }
262
+
263
+ function templateFor(catalog, id) {
264
+ return catalog?.templates?.find((template) => template.id === id) || null;
265
+ }
266
+
267
+ export function getCompatibleTemplates(catalog, categoryId, componentId) {
268
+ if (!categoryFor(catalog, categoryId) || !componentFor(catalog, componentId)) return [];
269
+ return (catalog?.templates || []).filter((template) => template.categoryIds.includes(categoryId));
270
+ }
271
+
272
+ export function isTemplateCompatible(catalog, categoryId, componentId, templateId) {
273
+ return getCompatibleTemplates(catalog, categoryId, componentId).some((template) => template.id === templateId);
274
+ }
275
+
276
+ function selectionError(message) {
277
+ return { valid: false, errors: { selection: message } };
278
+ }
279
+
280
+ export function validateIssueWizardState(state = {}, catalog) {
281
+ const errors = {};
282
+ const category = categoryFor(catalog, state.categoryId);
283
+ const component = componentFor(catalog, state.componentId);
284
+ const template = templateFor(catalog, state.templateId);
285
+
286
+ if (!category) errors.categoryId = "Choose a category.";
287
+ if (!component) errors.componentId = "Choose a component.";
288
+ if (category && component && (!template || !isTemplateCompatible(catalog, category.id, component.id, state.templateId))) {
289
+ errors.templateId = "Choose a compatible template.";
290
+ }
291
+ if (!normalizedTitleSummary(state.summary)) errors.summary = "Enter a short summary.";
292
+
293
+ if (template && category && component && isTemplateCompatible(catalog, category.id, component.id, template.id)) {
294
+ for (const field of template.fields) {
295
+ const value = normalizedText(state.fields?.[field.id], { multiline: field.kind === "textarea" });
296
+ if (field.required && !value) {
297
+ errors[field.id] = `${field.label} is required.`;
298
+ continue;
299
+ }
300
+ if (value && field.options && !field.options.some((option) => option.id === value)) {
301
+ errors[field.id] = `Choose a valid ${field.label.toLocaleLowerCase()}.`;
302
+ }
303
+ }
304
+ }
305
+
306
+ return { valid: Object.keys(errors).length === 0, errors };
307
+ }
308
+
309
+ export function isIssueWizardStepValid(state, catalog, step = state?.step) {
310
+ const category = categoryFor(catalog, state?.categoryId);
311
+ const component = componentFor(catalog, state?.componentId);
312
+ const template = templateFor(catalog, state?.templateId);
313
+ if (step === 1) return !!category;
314
+ if (step === 2) return !!component;
315
+ if (step === 3) return !!(category && component && template && isTemplateCompatible(catalog, category.id, component.id, template.id));
316
+ if (step === 4) {
317
+ if (!category || !component || !template || !isTemplateCompatible(catalog, category.id, component.id, template.id)) return false;
318
+ const validation = validateIssueWizardState(state, catalog);
319
+ return !Object.keys(validation.errors).some((key) => key !== "categoryId" && key !== "componentId" && key !== "templateId");
320
+ }
321
+ if (step === 5) return validateIssueWizardState(state, catalog).valid;
322
+ return false;
323
+ }
324
+
325
+ function resetTemplateSelection(state) {
326
+ return { ...state, templateId: "", fields: {} };
327
+ }
328
+
329
+ /** Apply a single pure state transition; invalid selection actions preserve state. */
330
+ export function reduceIssueWizardState(state = createIssueWizardState(), action = {}, catalog) {
331
+ const current = {
332
+ ...createIssueWizardState(),
333
+ ...state,
334
+ fields: { ...(state.fields || {}) },
335
+ };
336
+
337
+ switch (action.type) {
338
+ case "select-category": {
339
+ if (!categoryFor(catalog, action.categoryId)) return current;
340
+ return { ...resetTemplateSelection(current), categoryId: action.categoryId, step: Math.min(current.step, 2) };
341
+ }
342
+ case "select-component": {
343
+ if (!componentFor(catalog, action.componentId)) return current;
344
+ return { ...resetTemplateSelection(current), componentId: action.componentId, step: Math.min(current.step, 3) };
345
+ }
346
+ case "select-template": {
347
+ if (!isTemplateCompatible(catalog, current.categoryId, current.componentId, action.templateId)) return current;
348
+ return { ...current, templateId: action.templateId, fields: {}, step: Math.min(current.step, 4) };
349
+ }
350
+ case "set-summary":
351
+ return { ...current, summary: String(action.summary ?? "") };
352
+ case "set-field": {
353
+ const template = templateFor(catalog, current.templateId);
354
+ if (!template?.fields.some((field) => field.id === action.fieldId)) return current;
355
+ return { ...current, fields: { ...current.fields, [action.fieldId]: String(action.value ?? "") } };
356
+ }
357
+ case "next":
358
+ return isIssueWizardStepValid(current, catalog, current.step)
359
+ ? { ...current, step: Math.min(ISSUE_WIZARD_STEP_COUNT, current.step + 1) }
360
+ : current;
361
+ case "back":
362
+ return { ...current, step: Math.max(1, current.step - 1) };
363
+ case "reset":
364
+ return createIssueWizardState();
365
+ default:
366
+ return current;
367
+ }
368
+ }
369
+
370
+ function neutralizeGithubReferences(value) {
371
+ return value.replace(/@(?=[A-Za-z0-9_-])/gu, "@\u200B").replace(/#(?=\d)/gu, "#\u200B");
372
+ }
373
+
374
+ function escapeMarkdown(value) {
375
+ return neutralizeGithubReferences(normalizedText(value))
376
+ .replace(/\\/g, "\\\\")
377
+ .replace(/([`*_{}\[\]<>()[\]|])/g, "\\$1")
378
+ .replace(/^([>#]|[-+]|\d+\.)/gm, "\\$1");
379
+ }
380
+
381
+ function fieldValueForBody(field, value) {
382
+ const normalized = normalizedText(value, { multiline: field.kind === "textarea" });
383
+ const option = field.options?.find((candidate) => candidate.id === normalized);
384
+ return escapeMarkdown(option?.label || normalized);
385
+ }
386
+
387
+ export class IssueWizardValidationError extends Error {
388
+ constructor(errors) {
389
+ super("Issue wizard state is incomplete or invalid.");
390
+ this.name = "IssueWizardValidationError";
391
+ this.errors = errors;
392
+ }
393
+ }
394
+
395
+ /** Build the complete, I/O-free GitHub issue payload after validating the wizard state. */
396
+ export function buildIssuePayload(state, catalog) {
397
+ const validation = validateIssueWizardState(state, catalog);
398
+ if (!validation.valid) throw new IssueWizardValidationError(validation.errors);
399
+
400
+ const category = categoryFor(catalog, state.categoryId);
401
+ const component = componentFor(catalog, state.componentId);
402
+ const template = templateFor(catalog, state.templateId);
403
+ const summary = normalizedTitleSummary(state.summary);
404
+ const title = `[${category.label}] [${component.label}] [${template.label}] ${neutralizeGithubReferences(summary)}`;
405
+ const details = template.fields.flatMap((field) => [
406
+ `### ${field.label}`,
407
+ fieldValueForBody(field, state.fields[field.id]),
408
+ "",
409
+ ]);
410
+ const body = [
411
+ `## ${template.label}`,
412
+ "",
413
+ `**Category:** ${category.label}`,
414
+ `**Component:** ${component.label}`,
415
+ "",
416
+ "## Summary",
417
+ escapeMarkdown(summary),
418
+ "",
419
+ "## Details",
420
+ "",
421
+ ...details,
422
+ ].join("\n").trimEnd();
423
+
424
+ return Object.freeze({ title, body });
425
+ }
426
+
427
+ /** Serializes the exact title/body payload that a future adapter will receive. */
428
+ export function serializeIssuePayload(payload) {
429
+ return JSON.stringify({ title: String(payload?.title || ""), body: String(payload?.body || "") });
430
+ }
431
+
432
+ export function issueClipboardText(payload) {
433
+ return `${String(payload?.title || "")}\n\n${String(payload?.body || "")}`;
434
+ }
435
+
436
+ /** Future integration seam. It deliberately performs no network, storage, or GitHub I/O. */
437
+ export async function submitIssueToGithubBot(_payload) {
438
+ return Object.freeze({
439
+ ok: false,
440
+ status: "unavailable",
441
+ message: "Automatic submission is coming soon. Copy the issue instead.",
442
+ });
443
+ }
@@ -1,9 +1,11 @@
1
- const CACHE_NAME = "pi-webui-pwa-v46";
1
+ const CACHE_NAME = "pi-webui-pwa-v48";
2
2
  const APP_SHELL = [
3
3
  "/",
4
4
  "/index.html",
5
5
  "/styles.css",
6
6
  "/app.js",
7
+ "/issue-wizard-state.mjs",
8
+ "/issue-bot-client.mjs",
7
9
  "/aur-review-payload.mjs",
8
10
  "/guided-git-command-state.mjs",
9
11
  "/guided-git-review-state.mjs",
package/public/styles.css CHANGED
@@ -3506,6 +3506,23 @@ body.embedded-split .side-panel-backdrop {
3506
3506
  .terminal-tab-group.menu-open .terminal-tab-group-menu {
3507
3507
  display: flex;
3508
3508
  }
3509
+ .terminal-tab-group-summary {
3510
+ width: 100%;
3511
+ padding: 0.56rem 0.62rem;
3512
+ overflow-wrap: anywhere;
3513
+ color: rgba(var(--ctp-text-rgb), 0.92);
3514
+ border: 1px solid rgba(148, 226, 213, 0.24);
3515
+ border-radius: 0.72rem;
3516
+ background:
3517
+ linear-gradient(135deg, rgba(148, 226, 213, 0.11), rgba(203, 166, 247, 0.08)),
3518
+ rgba(var(--ctp-crust-rgb), 0.96);
3519
+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 0.65rem 1.25rem rgba(var(--ctp-crust-rgb), 0.28);
3520
+ font-size: max(var(--text-xs), 0.76rem);
3521
+ font-weight: 720;
3522
+ line-height: 1.48;
3523
+ text-align: left;
3524
+ white-space: pre-wrap;
3525
+ }
3509
3526
  .terminal-tab-group-item {
3510
3527
  display: inline-flex;
3511
3528
  flex: 0 0 auto;
@@ -4308,6 +4325,21 @@ button.footer-tui-item {
4308
4325
  opacity: 1;
4309
4326
  transform: translateY(0);
4310
4327
  }
4328
+ .footer-floating-tooltip[data-variant="workspace"] {
4329
+ width: max-content;
4330
+ min-width: min(18rem, calc(100vw - 1rem));
4331
+ padding: 0.72rem 0.8rem;
4332
+ color: rgba(var(--ctp-text-rgb), 0.96);
4333
+ border-color: rgba(148, 226, 213, 0.42);
4334
+ background:
4335
+ linear-gradient(145deg, rgba(148, 226, 213, 0.10), rgba(203, 166, 247, 0.08)),
4336
+ rgba(var(--ctp-crust-rgb), 0.98);
4337
+ box-shadow: 0 1rem 2.2rem rgba(var(--ctp-crust-rgb), 0.55), 0 0 1.2rem rgba(148, 226, 213, 0.10), inset 0 1px 0 rgba(255,255,255,0.06);
4338
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
4339
+ font-size: max(var(--text-xs), 0.78rem);
4340
+ font-weight: 680;
4341
+ line-height: 1.52;
4342
+ }
4311
4343
  .footer-metric {
4312
4344
  display: inline-grid;
4313
4345
  grid-template-columns: auto auto minmax(0, 1fr);
@@ -4425,6 +4457,7 @@ button.footer-meta {
4425
4457
  z-index: 0;
4426
4458
  pointer-events: none;
4427
4459
  background: var(--context-card-gradient);
4460
+ opacity: 0.34;
4428
4461
  clip-path: inset(0 calc(100% - var(--context-usage)) 0 0);
4429
4462
  }
4430
4463
  .footer-context-card > * {
@@ -14019,3 +14052,182 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
14019
14052
  font-size: var(--text-sm);
14020
14053
  }
14021
14054
  }
14055
+
14056
+ /* Open Issue wizard: kept outside the scrolling Control Deck body. */
14057
+ .side-panel {
14058
+ grid-template-rows: auto minmax(0, 1fr) auto;
14059
+ }
14060
+ .side-panel-footer {
14061
+ display: flex;
14062
+ justify-content: flex-end;
14063
+ padding: 0.72rem 0.95rem calc(0.72rem + env(safe-area-inset-bottom));
14064
+ border-top: 1px solid rgba(180, 190, 254, 0.16);
14065
+ background: linear-gradient(90deg, rgba(var(--ctp-crust-rgb), 0.96), rgba(var(--ctp-base-rgb), 0.82));
14066
+ }
14067
+ .open-issue-button {
14068
+ width: auto;
14069
+ min-width: 8.75rem;
14070
+ min-height: 2.5rem;
14071
+ color: #11111b;
14072
+ border-color: transparent;
14073
+ background: linear-gradient(120deg, var(--ctp-teal), var(--ctp-blue));
14074
+ font-weight: 850;
14075
+ }
14076
+ .open-issue-button:hover,
14077
+ .open-issue-button:focus-visible {
14078
+ color: #11111b;
14079
+ border-color: rgba(203, 166, 247, 0.72);
14080
+ box-shadow: 0 0 0 3px rgba(148, 226, 213, 0.14), 0 0 1.1rem rgba(137, 180, 250, 0.25);
14081
+ }
14082
+ .issue-wizard-dialog {
14083
+ width: min(54rem, calc(100vw - 1.5rem));
14084
+ max-height: min(54rem, calc(var(--visual-viewport-height, 100dvh) - 1.5rem));
14085
+ overflow: hidden;
14086
+ border-color: rgba(148, 226, 213, 0.46);
14087
+ box-shadow: 0 2rem 5rem var(--shadow), 0 0 2.25rem rgba(148, 226, 213, 0.16);
14088
+ }
14089
+ .issue-wizard-dialog form {
14090
+ display: grid;
14091
+ grid-template-rows: auto auto minmax(12rem, 1fr) auto auto auto auto;
14092
+ gap: 0.78rem;
14093
+ max-height: calc(min(54rem, var(--visual-viewport-height, 100dvh)) - 3rem);
14094
+ min-height: 0;
14095
+ }
14096
+ .issue-wizard-header,
14097
+ .issue-wizard-progress-row,
14098
+ .issue-wizard-actions {
14099
+ display: flex;
14100
+ align-items: center;
14101
+ justify-content: space-between;
14102
+ gap: 0.75rem;
14103
+ }
14104
+ .issue-wizard-header { align-items: flex-start; }
14105
+ .issue-wizard-header h2 { margin: 0.14rem 0 0; color: var(--ctp-teal); }
14106
+ .issue-wizard-header p { margin: 0.28rem 0 0; }
14107
+ .issue-wizard-kicker {
14108
+ color: var(--ctp-blue);
14109
+ font-size: var(--text-xs);
14110
+ font-weight: 900;
14111
+ letter-spacing: 0.16em;
14112
+ text-transform: uppercase;
14113
+ }
14114
+ .issue-wizard-progress-row {
14115
+ flex-wrap: wrap;
14116
+ padding: 0.6rem 0.72rem;
14117
+ border: 1px solid rgba(180, 190, 254, 0.18);
14118
+ border-radius: 0.7rem;
14119
+ color: rgba(var(--ctp-subtext-rgb), 0.84);
14120
+ background: rgba(var(--ctp-crust-rgb), 0.46);
14121
+ font-size: var(--text-xs);
14122
+ }
14123
+ .issue-wizard-progress { color: var(--ctp-teal); font-weight: 900; }
14124
+ .issue-wizard-pages {
14125
+ min-height: 0;
14126
+ overflow: auto;
14127
+ overscroll-behavior: contain;
14128
+ padding: 0.1rem 0.15rem 0.25rem;
14129
+ }
14130
+ .issue-wizard-page { display: grid; gap: 0.76rem; }
14131
+ .issue-wizard-intro { margin: 0; color: rgba(var(--ctp-text-rgb), 0.9); line-height: 1.45; }
14132
+ .issue-wizard-choice-grid,
14133
+ .issue-wizard-inline-choices {
14134
+ display: grid;
14135
+ grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
14136
+ gap: 0.62rem;
14137
+ }
14138
+ .issue-wizard-inline-choices { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
14139
+ .issue-wizard-choice {
14140
+ display: grid;
14141
+ gap: 0.28rem;
14142
+ min-height: 3.15rem;
14143
+ padding: 0.65rem 0.75rem;
14144
+ border-color: rgba(180, 190, 254, 0.28);
14145
+ color: var(--ctp-text);
14146
+ background: rgba(var(--ctp-surface-rgb), 0.58);
14147
+ font-weight: 750;
14148
+ line-height: 1.25;
14149
+ text-align: left;
14150
+ white-space: normal;
14151
+ }
14152
+ .issue-wizard-choice strong { color: inherit; font-size: var(--text-sm); }
14153
+ .issue-wizard-choice-description,
14154
+ .issue-wizard-choice-preview { color: rgba(var(--ctp-subtext-rgb), 0.82); font-size: var(--text-xs); font-weight: 500; line-height: 1.4; }
14155
+ .issue-wizard-choice-preview { color: rgba(var(--ctp-teal-rgb), 0.82); }
14156
+ .issue-wizard-choice:hover,
14157
+ .issue-wizard-choice:focus-visible,
14158
+ .issue-wizard-choice.selected {
14159
+ border-color: rgba(148, 226, 213, 0.7);
14160
+ color: var(--ctp-teal);
14161
+ background: rgba(148, 226, 213, 0.1);
14162
+ box-shadow: 0 0 0 2px rgba(148, 226, 213, 0.1), 0 0 0.9rem rgba(148, 226, 213, 0.1);
14163
+ }
14164
+ .issue-wizard-field,
14165
+ .issue-wizard-preview {
14166
+ display: grid;
14167
+ gap: 0.42rem;
14168
+ min-width: 0;
14169
+ }
14170
+ .issue-wizard-field-label { color: rgba(var(--ctp-text-rgb), 0.88); font-size: var(--text-xs); font-weight: 850; letter-spacing: 0.04em; }
14171
+ .issue-wizard-textarea,
14172
+ .issue-wizard-select,
14173
+ .issue-wizard-preview-title,
14174
+ .issue-wizard-preview-body {
14175
+ width: 100%;
14176
+ min-width: 0;
14177
+ padding: 0.68rem 0.74rem;
14178
+ border: 1px solid rgba(180, 190, 254, 0.3);
14179
+ border-radius: 0.7rem;
14180
+ color: var(--ctp-text);
14181
+ background: rgba(var(--ctp-crust-rgb), 0.58);
14182
+ font: inherit;
14183
+ line-height: 1.42;
14184
+ }
14185
+ .issue-wizard-textarea,
14186
+ .issue-wizard-preview-title,
14187
+ .issue-wizard-preview-body { resize: vertical; }
14188
+ .issue-wizard-preview-title,
14189
+ .issue-wizard-preview-body { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
14190
+ .issue-wizard-preview-body { min-height: 14rem; }
14191
+ .issue-wizard-status,
14192
+ .issue-wizard-bot-hint { min-height: 1.25rem; margin: 0; font-size: var(--text-xs); }
14193
+ .issue-wizard-bot-hint { color: var(--ctp-yellow); }
14194
+ .issue-wizard-submission-status {
14195
+ display: grid;
14196
+ gap: 0.56rem;
14197
+ padding: 0.72rem;
14198
+ border: 1px solid rgba(148, 226, 213, 0.34);
14199
+ border-radius: 0.7rem;
14200
+ color: var(--ctp-text);
14201
+ background: rgba(148, 226, 213, 0.08);
14202
+ font-size: var(--text-sm);
14203
+ }
14204
+ .issue-wizard-submission-message,
14205
+ .issue-wizard-security-guidance { margin: 0; line-height: 1.45; }
14206
+ .issue-wizard-submission-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
14207
+ .issue-wizard-submission-actions a,
14208
+ .issue-wizard-security-guidance a { color: var(--ctp-teal); font-weight: 800; }
14209
+ .issue-wizard-security-guidance { color: var(--ctp-yellow); font-size: var(--text-xs); }
14210
+ .issue-wizard-turnstile { min-height: 0; }
14211
+ .issue-wizard-actions { justify-content: flex-end; flex-wrap: wrap; margin: 0; padding: 0; }
14212
+ .issue-wizard-actions #issueWizardCopyButton { margin-left: auto; }
14213
+ .issue-wizard-actions #issueWizardBotButton:disabled {
14214
+ color: rgba(var(--ctp-subtext-rgb), 0.82);
14215
+ border-color: rgba(var(--ctp-overlay-rgb), 0.4);
14216
+ background: rgba(var(--ctp-surface-rgb), 0.45);
14217
+ }
14218
+
14219
+ @media (max-width: 720px), (max-device-width: 720px), (pointer: coarse) and (hover: none) {
14220
+ .side-panel-footer { padding-inline: 0.75rem; }
14221
+ .open-issue-button { width: 100%; }
14222
+ .issue-wizard-dialog { max-height: calc(var(--visual-viewport-height, 100dvh) - env(safe-area-inset-top)); }
14223
+ .issue-wizard-dialog form { max-height: calc(var(--visual-viewport-height, 100dvh) - 2rem); }
14224
+ .issue-wizard-header,
14225
+ .issue-wizard-progress-row { align-items: stretch; flex-direction: column; }
14226
+ .issue-wizard-header > button { align-self: flex-end; }
14227
+ .issue-wizard-choice-grid,
14228
+ .issue-wizard-inline-choices { grid-template-columns: 1fr; }
14229
+ .issue-wizard-actions { display: grid; grid-template-columns: 1fr 1fr; }
14230
+ .issue-wizard-actions button { width: 100%; }
14231
+ .issue-wizard-actions #issueWizardCopyButton { margin-left: 0; }
14232
+ .issue-wizard-actions #issueWizardBotButton { grid-column: 1 / -1; }
14233
+ }