lycheedev 2.5.0 → 3.0.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.
Files changed (40) hide show
  1. package/bin/lycheedev.mjs +39 -3
  2. package/bin/update.mjs +168 -0
  3. package/native/windows-amd64/lycheedev.exe +0 -0
  4. package/package.json +1 -1
  5. package/payload/addon/Bridge/ActivityView.lua +26 -12
  6. package/payload/addon/Bridge/InputProtection.lua +63 -0
  7. package/payload/addon/Bridge/InputState.lua +45 -0
  8. package/payload/addon/Bridge/MemoryProtocol.lua +31 -0
  9. package/payload/addon/Bridge/ProbeExecution.lua +147 -0
  10. package/payload/addon/Bridge/ReceiverBindings.lua +6 -0
  11. package/payload/addon/Bridge/SlotProtocol.lua +165 -0
  12. package/payload/addon/Bridge/SlotRuntime.lua +106 -0
  13. package/payload/addon/Bridge/StartupBeacon.lua +8 -11
  14. package/payload/addon/Core/Compat.lua +7 -0
  15. package/payload/addon/Core/Controls.lua +16 -0
  16. package/payload/addon/Core/Locale.lua +6 -4
  17. package/payload/addon/Core/Locale_enUS.lua +4 -2
  18. package/payload/addon/Core/Platform.lua +4 -2
  19. package/payload/addon/Core/Runtime.lua +17 -6
  20. package/payload/addon/Lychee Dev.toc +8 -2
  21. package/payload/addon/Modules/AutomationHistory.lua +119 -0
  22. package/payload/addon/Modules/AutomationView.lua +26 -6
  23. package/payload/addon/UI/Pages/About.lua +0 -3
  24. package/payload/addon/UI/Pages/Automation.lua +40 -27
  25. package/payload/addon/UI/Pages/Diagnostics.lua +2 -4
  26. package/payload/addon/UI/Pages/Object.lua +0 -1
  27. package/payload/addon/UI/Pages/Run.lua +2 -1
  28. package/payload/addon/UI/Pages/Trace.lua +0 -1
  29. package/payload/addon/UI/Theme.lua +3 -2
  30. package/payload/addon/UI/Widgets.lua +32 -22
  31. package/payload/addon/UI/Window.lua +3 -35
  32. package/payload/skill/SKILL.md +40 -60
  33. package/payload/skill/agents/openai.yaml +1 -1
  34. package/payload/skill/references/commands.md +22 -15
  35. package/payload/skill/references/error-diagnosis.md +7 -11
  36. package/payload/skill/references/installation.md +64 -13
  37. package/payload/skill/references/live-investigation.md +193 -252
  38. package/payload/skill/references/live-startup.md +62 -132
  39. package/release.json +97 -67
  40. package/payload/addon/UI/Pages/Settings.lua +0 -82
@@ -1,11 +1,9 @@
1
1
  local ADDON_NAME, ns = ...
2
2
 
3
- -- View-model for the workbench Automation page. It is a bounded, session-only
4
- -- observation list over the SAME game-side probe machinery the CLI drives
5
- -- (ns.ProbeQueue / ns.ProbeRunner / ns.ReportStore). There is no second
6
- -- executor and no task registry here: every status is derived from the bridge
7
- -- records, and Execute routes through ProbeQueue.Load + ProbeRunner.Dispatch,
8
- -- the exact functions the /dev bridge verbs call.
3
+ -- Workbench view over legacy queue records and the current memory-slot
4
+ -- history. Native history persists per character and is strictly read-only;
5
+ -- manual Execute remains solely for legacy queue entries. Neither provider
6
+ -- makes this page a second executor or a transport recovery journal.
9
7
  --
10
8
  -- Real status vocabulary (derived from the bridge surface):
11
9
  -- queued lycheedev.queue.v1 entry registered, nothing loaded yet
@@ -147,6 +145,7 @@ local function DeriveStatus(requestId)
147
145
  end
148
146
 
149
147
  local function ApplyDerived(record)
148
+ if record.transport == "memory-slot" then return record end
150
149
  record.status, record.errorCode = nil, nil
151
150
  record.receipt, record.reportBody, record.hasReport = nil, nil, nil
152
151
  record.probeStatus, record.probeError = nil, nil
@@ -206,6 +205,21 @@ local function Observe(incoming)
206
205
  end
207
206
 
208
207
  local function Collect()
208
+ if ns.AutomationHistory then
209
+ local current = {}
210
+ for _,stored in ipairs(ns.AutomationHistory.List()) do
211
+ local incoming={transport="memory-slot",kind=KIND_LUA}
212
+ for key,value in pairs(stored) do incoming[key]=value end
213
+ current[incoming.requestId]=true
214
+ Observe(incoming)
215
+ end
216
+ for index=#records,1,-1 do
217
+ local record=records[index]
218
+ if record.transport=="memory-slot" and not current[record.requestId] then
219
+ recordIndex[record.requestId]=nil;table.remove(records,index)
220
+ end
221
+ end
222
+ end
209
223
  if not ns.ProbeQueue and not ns.ReportStore and not ns.Persistence then
210
224
  return 0
211
225
  end
@@ -300,6 +314,7 @@ local function Execute(target)
300
314
  if not record then
301
315
  return nil, "auto_execution_unknown"
302
316
  end
317
+ if record.transport=="memory-slot" then return nil,"auto_history_read_only" end
303
318
  if not ns.ProbeQueue or type(ns.ProbeQueue.Load) ~= "function"
304
319
  or not ns.ProbeRunner or type(ns.ProbeRunner.Dispatch) ~= "function" then
305
320
  return nil, "bridge_unavailable"
@@ -316,6 +331,7 @@ local function ShowNotice(target)
316
331
  if not record then
317
332
  return nil, "auto_execution_unknown"
318
333
  end
334
+ if record.transport=="memory-slot" then return nil,"auto_notice_unavailable" end
319
335
  local receipt = record.receipt
320
336
  if not receipt then
321
337
  receipt = ReportRead(record.requestId)
@@ -355,6 +371,9 @@ local function GetReportText(target)
355
371
  if type(body) ~= "string" then
356
372
  return nil, ns.L.AUTO_NO_REPORT
357
373
  end
374
+ if record.reportTruncated then
375
+ return body .. "\n... " .. string.format(ns.L.AUTO_REPORT_HISTORY_LIMIT, ns.AutomationHistory.REPORT_BYTES / 1024)
376
+ end
358
377
  if #body > REPORT_DISPLAY_BYTES then
359
378
  return body:sub(1, REPORT_DISPLAY_BYTES)
360
379
  .. "\n... " .. string.format(ns.L.AUTO_REPORT_DISPLAY_LIMIT, REPORT_DISPLAY_BYTES / 1024)
@@ -370,6 +389,7 @@ local function ClearRecords()
370
389
  for index = #records, 1, -1 do
371
390
  local record = records[index]
372
391
  if not IsProtected(record) and not IsPending(record) then
392
+ if record.transport=="memory-slot" then ns.AutomationHistory.Remove(record.requestId) end
373
393
  table.remove(records, index)
374
394
  recordIndex[record.requestId] = nil
375
395
  removed = removed + 1
@@ -100,9 +100,6 @@ local function BuildAboutPage(parent)
100
100
  hasGrabber and L.ABOUT_DEPENDENCY_DETAIL or L.BUGGRABBER_UNAVAILABLE,
101
101
  -358, hasGrabber)
102
102
 
103
- CreateEnvironmentRow(page, L.ABOUT_SAFETY, L.ABOUT_SAFETY_STATUS,
104
- L.ABOUT_SAFETY_TEXT, -423, false)
105
-
106
103
  local githubButton = CreateFrame("Button", nil, page)
107
104
  githubButton:SetSize(32, 32)
108
105
  githubButton:SetPoint("BOTTOMLEFT", 17, 17)
@@ -10,7 +10,9 @@ local L = ns.L
10
10
  local W = ns.Widgets
11
11
  local view = ns.AutomationView
12
12
 
13
- local ROW_HEIGHT = 64
13
+ local ROW_HEIGHT = 60
14
+ local ROW_GAP = 4
15
+ local ROW_STRIDE = ROW_HEIGHT + ROW_GAP
14
16
  local LIST_WIDTH = 256
15
17
  local VISIBLE_ROWS = 8
16
18
 
@@ -26,6 +28,7 @@ local STATUS_LABELS = {
26
28
  acknowledged = "AUTO_STATUS_ACKNOWLEDGED",
27
29
  cleared = "AUTO_STATUS_CLEARED",
28
30
  unavailable = "AUTO_STATUS_UNAVAILABLE",
31
+ interrupted = "AUTO_STATUS_INTERRUPTED",
29
32
  }
30
33
 
31
34
  local KIND_LABELS = {
@@ -47,7 +50,7 @@ local function ShownText(value, fallback)
47
50
  return tostring(value)
48
51
  end
49
52
 
50
- local function GetStatusText(record)
53
+ local function GetLifecycleText(record)
51
54
  if record.status == "unavailable" and record.errorCode then
52
55
  return ShownText(record.errorCode)
53
56
  end
@@ -55,6 +58,14 @@ local function GetStatusText(record)
55
58
  return key and L[key] or ShownText(record.status, L.UNKNOWN)
56
59
  end
57
60
 
61
+ local function GetStatusText(record)
62
+ if record.status == "reported" or record.status == "acknowledged" then
63
+ if record.probeStatus == "failed" then return L.AUTO_STATUS_FAILED end
64
+ if record.probeStatus == "completed" then return L.AUTO_STATUS_SUCCEEDED end
65
+ end
66
+ return GetLifecycleText(record)
67
+ end
68
+
58
69
  local function GetKindLabel(kind)
59
70
  local key = KIND_LABELS[kind]
60
71
  return key and L[key] or L.EXPORT_KIND_UNKNOWN
@@ -131,11 +142,13 @@ function ns.CreateAutomationPage(parent)
131
142
  end, "secondary")
132
143
  clearButton:SetPoint("BOTTOMLEFT", 14, 14)
133
144
 
134
- local hideNoticeButton = W.CreateButton(page, 118, L.AUTO_HIDE_NOTICE, "secondary")
135
- hideNoticeButton:SetPoint("BOTTOMRIGHT", -14, 14)
136
-
137
- local showNoticeButton = W.CreateButton(page, 128, L.AUTO_SHOW_NOTICE, "secondary")
138
- showNoticeButton:SetPoint("RIGHT", hideNoticeButton, "LEFT", -8, 0)
145
+ local hideNoticeButton, showNoticeButton
146
+ if not ns.SlotRuntime then
147
+ hideNoticeButton = W.CreateButton(page, 118, L.AUTO_HIDE_NOTICE, "secondary")
148
+ hideNoticeButton:SetPoint("BOTTOMRIGHT", -14, 14)
149
+ showNoticeButton = W.CreateButton(page, 128, L.AUTO_SHOW_NOTICE, "secondary")
150
+ showNoticeButton:SetPoint("RIGHT", hideNoticeButton, "LEFT", -8, 0)
151
+ end
139
152
 
140
153
  local executeButton = W.CreateButton(page, 96, L.AUTO_EXECUTE, "primary")
141
154
  executeButton:SetPoint("TOPRIGHT", -14, -84)
@@ -147,7 +160,7 @@ function ns.CreateAutomationPage(parent)
147
160
 
148
161
  local listScroll = W.CreateScrollArea(listPanel, 8, 8, 7, 8)
149
162
  local listContent = CreateFrame("Frame", nil, listScroll)
150
- listContent:SetWidth(LIST_WIDTH - 26)
163
+ listContent:SetWidth(LIST_WIDTH - 31)
151
164
  listContent:SetHeight(1)
152
165
  listScroll:SetScrollChild(listContent)
153
166
 
@@ -200,7 +213,7 @@ function ns.CreateAutomationPage(parent)
200
213
  end)
201
214
 
202
215
  local function StatusColor(record)
203
- if record.status == "unavailable" or record.probeStatus == "failed" then
216
+ if record.status == "unavailable" or record.status == "interrupted" or record.probeStatus == "failed" then
204
217
  return ns.Theme.danger[1], ns.Theme.danger[2], ns.Theme.danger[3], 1
205
218
  elseif record.status == "reported" or record.probeStatus == "completed" then
206
219
  return ns.Theme.success[1], ns.Theme.success[2], ns.Theme.success[3], 1
@@ -235,14 +248,14 @@ function ns.CreateAutomationPage(parent)
235
248
  end
236
249
  requestValue:SetText(hasRecord and ShownText(record.requestId) or "")
237
250
  kindValue:SetText(hasRecord and GetKindLabel(record.kind) or "")
238
- statusValue:SetText(hasRecord and GetStatusText(record) or "")
251
+ statusValue:SetText(hasRecord and GetLifecycleText(record) or "")
239
252
  codeValue:SetText(hasRecord and FormatCode(record) or "")
240
253
  timeValue:SetText(hasRecord and FormatRecorded(record) or "")
241
254
  errorValue:SetText(hasRecord
242
255
  and ShownText(record.actionError or record.probeError or record.errorCode, L.NOT_AVAILABLE) or "")
243
256
 
244
- W.SetButtonEnabled(executeButton, hasRecord and (record.status == "queued" or record.status == "loaded"))
245
- W.SetButtonEnabled(showNoticeButton, hasRecord and record.receipt ~= nil)
257
+ W.SetButtonEnabled(executeButton, hasRecord and record.transport~="memory-slot" and (record.status == "queued" or record.status == "loaded"))
258
+ if showNoticeButton then W.SetButtonEnabled(showNoticeButton, hasRecord and record.receipt ~= nil) end
246
259
  W.SetButtonEnabled(viewReportButton, hasRecord)
247
260
  W.SetButtonEnabled(detailsButton, hasRecord)
248
261
  end
@@ -268,14 +281,14 @@ function ns.CreateAutomationPage(parent)
268
281
  return row
269
282
  end
270
283
 
271
- row = W.CreateListRow(listContent, ROW_HEIGHT)
284
+ row = W.CreateListRow(listContent, ROW_HEIGHT, true)
272
285
  row:SetPoint("TOPLEFT", 0, 0)
273
286
  row:SetPoint("TOPRIGHT", 0, 0)
274
287
  row.hovered = false
275
288
 
276
289
  local title = row:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
277
290
  ns.Theme.SetFont(title, 12, ns.Theme.text)
278
- title:SetPoint("TOPLEFT", 12, -10)
291
+ title:SetPoint("TOPLEFT", 14, -11)
279
292
  title:SetPoint("TOPRIGHT", -100, -10)
280
293
  title:SetJustifyH("LEFT")
281
294
  title:SetWordWrap(false)
@@ -283,14 +296,14 @@ function ns.CreateAutomationPage(parent)
283
296
 
284
297
  local status = row:CreateFontString(nil, "OVERLAY", "GameFontDisableSmall")
285
298
  ns.Theme.SetFont(status, 11, ns.Theme.textDim)
286
- status:SetPoint("TOPRIGHT", -10, -10)
299
+ status:SetPoint("TOPRIGHT", -12, -11)
287
300
  status:SetJustifyH("RIGHT")
288
301
  row.status = status
289
302
 
290
303
  local meta = row:CreateFontString(nil, "OVERLAY", "GameFontDisableSmall")
291
304
  ns.Theme.SetFont(meta, 11, ns.Theme.textDim)
292
- meta:SetPoint("BOTTOMLEFT", 12, 9)
293
- meta:SetPoint("BOTTOMRIGHT", -10, 9)
305
+ meta:SetPoint("BOTTOMLEFT", 14, 10)
306
+ meta:SetPoint("BOTTOMRIGHT", -12, 10)
294
307
  meta:SetJustifyH("LEFT")
295
308
  meta:SetWordWrap(false)
296
309
  meta:SetTextColor(unpack(ns.Theme.textDim))
@@ -327,7 +340,7 @@ function ns.CreateAutomationPage(parent)
327
340
  if Restricted(scrollOffset) then
328
341
  scrollOffset = 0
329
342
  end
330
- local firstIndex = math.floor((scrollOffset or 0) / ROW_HEIGHT) + 1
343
+ local firstIndex = math.floor((scrollOffset or 0) / ROW_STRIDE) + 1
331
344
  local lastIndex = math.min(#order, firstIndex + VISIBLE_ROWS - 1)
332
345
  local poolIndex = 0
333
346
  for orderIndex = firstIndex, lastIndex do
@@ -336,17 +349,17 @@ function ns.CreateAutomationPage(parent)
336
349
  local row = rows[poolIndex] or AcquireRow(poolIndex)
337
350
  row.requestId = record.requestId
338
351
  row:ClearAllPoints()
339
- row:SetPoint("TOPLEFT", 0, -((orderIndex - 1) * ROW_HEIGHT))
340
- row:SetPoint("TOPRIGHT", 0, -((orderIndex - 1) * ROW_HEIGHT))
352
+ row:SetPoint("TOPLEFT", 0, -((orderIndex - 1) * ROW_STRIDE))
353
+ row:SetPoint("TOPRIGHT", 0, -((orderIndex - 1) * ROW_STRIDE))
341
354
  row.title:SetText(GetKindLabel(record.kind))
342
355
  row.status:SetText(GetStatusText(record))
343
356
  row.status:SetTextColor(StatusColor(record))
344
- row.meta:SetText(FormatTime(record.observedAt) .. " | " .. GetKindLabel(record.kind))
357
+ row.meta:SetText(FormatTime(record.observedAt))
345
358
  ApplyRowState(row)
346
359
  row:Show()
347
360
  end
348
361
 
349
- listContent:SetHeight(math.max(1, #order * ROW_HEIGHT))
362
+ listContent:SetHeight(math.max(1, #order * ROW_STRIDE - ROW_GAP))
350
363
  listScroll:UpdateScrollChildRect()
351
364
 
352
365
  -- Newest record first: when the selection is gone, fall back to the
@@ -356,8 +369,8 @@ function ns.CreateAutomationPage(parent)
356
369
  end
357
370
  if not selectedRequestId and order[1] then
358
371
  selectedRequestId = order[1]
359
- ShowSelectedReport()
360
372
  end
373
+ if selectedRequestId then ShowSelectedReport() end
361
374
  for index = 1, #rows do
362
375
  ApplyRowState(rows[index])
363
376
  end
@@ -390,7 +403,7 @@ function ns.CreateAutomationPage(parent)
390
403
  Refresh()
391
404
  end)
392
405
 
393
- showNoticeButton:SetScript("OnClick", function()
406
+ if showNoticeButton then showNoticeButton:SetScript("OnClick", function()
394
407
  if ns.Safety.IsCombatBlocked() then
395
408
  ns.Safety.PrintBlocked()
396
409
  return
@@ -398,12 +411,12 @@ function ns.CreateAutomationPage(parent)
398
411
  if selectedRequestId then
399
412
  view.ShowNotice(selectedRequestId)
400
413
  end
401
- end)
414
+ end) end
402
415
 
403
416
  -- Hiding the notice is teardown and must stay available in every state.
404
- hideNoticeButton:SetScript("OnClick", function()
417
+ if hideNoticeButton then hideNoticeButton:SetScript("OnClick", function()
405
418
  view.HideNotice()
406
- end)
419
+ end) end
407
420
 
408
421
  viewReportButton:SetScript("OnClick", function()
409
422
  metadata:Hide();reportArea:Show()
@@ -45,11 +45,9 @@ local function BuildDiagnosticsPage(parent)
45
45
  status:SetWidth(ERROR_LIST_WIDTH - 10)
46
46
  status:SetJustifyH("LEFT")
47
47
  local function SetStatus(text, errorState)
48
- local r = errorState and accent[1] or 0.55
49
- local g = errorState and accent[2] or 0.60
50
- local b = errorState and accent[3] or 0.65
48
+ local color = errorState and ns.Theme.danger or ns.Theme.textMuted
51
49
  status:SetText(text or "")
52
- status:SetTextColor(r, g, b, 0.92)
50
+ status:SetTextColor(color[1], color[2], color[3], 1)
53
51
  end
54
52
 
55
53
  local errorsView = CreateFrame("Frame", nil, page)
@@ -625,7 +625,6 @@ local function BuildObjectPage(parent)
625
625
  if pickerActive then
626
626
  StopPicker(false)
627
627
  end
628
- pathPanel.editBox:SetFocus()
629
628
  end
630
629
 
631
630
  function page.HandleShutdown()
@@ -419,7 +419,8 @@ Workbench.RegisterPage{
419
419
  build = BuildRunPage,
420
420
  activate = function(page)
421
421
  page.RefreshHistory()
422
- page.inputPanel.editBox:SetFocus()
422
+ -- Opening a page is not a request to capture keyboard input. In
423
+ -- particular, an Agent showing results must still be able to finish.
423
424
  end,
424
425
  suspend = function(page)
425
426
  page.inputPanel.editBox:ClearFocus()
@@ -239,7 +239,6 @@ local function BuildTracePage(parent)
239
239
  end)
240
240
 
241
241
  function page.HandleActivate()
242
- input.editBox:SetFocus()
243
242
  SyncTraceButton()
244
243
  RefreshList()
245
244
  end
@@ -3,8 +3,9 @@ local ADDON_NAME, ns = ...
3
3
  -- Visual constants from Design.md. Loading this table creates no UI objects.
4
4
  ns.Theme = {
5
5
  window = { .055, .055, .063 },
6
- surfaceHover = { .090, .090, .090 },
7
- surfaceSelected = { .085, .085, .085 },
6
+ surfaceHover = { .125, .123, .130 },
7
+ surfaceSelected = { .175, .170, .180 },
8
+ listSelected = { .135, .125, .140 },
8
9
  field = { .085, .085, .095 },
9
10
  fieldBorder = { .400, .400, .420 },
10
11
  sidebar = { .075, .073, .078 },
@@ -60,7 +60,7 @@ end
60
60
  local function CreateScrollArea(parent, leftInset, topInset, rightInset, bottomInset, useNativeScrollFrame)
61
61
  local scroll = CreateFrame(useNativeScrollFrame and "ScrollFrame" or "Frame", nil, parent)
62
62
  scroll:SetPoint("TOPLEFT", leftInset, -topInset)
63
- scroll:SetPoint("BOTTOMRIGHT", -(rightInset + 11), bottomInset)
63
+ scroll:SetPoint("BOTTOMRIGHT", -(rightInset + 16), bottomInset)
64
64
  scroll:SetClipsChildren(true)
65
65
  scroll:EnableMouseWheel(true)
66
66
  scroll.verticalOffset = 0
@@ -68,33 +68,29 @@ local function CreateScrollArea(parent, leftInset, topInset, rightInset, bottomI
68
68
 
69
69
  local scrollbar = CreateFrame("Slider", nil, parent)
70
70
  scrollbar:SetOrientation("VERTICAL")
71
- scrollbar:SetPoint("TOPRIGHT", -rightInset, -topInset)
72
- scrollbar:SetPoint("BOTTOMRIGHT", -rightInset, bottomInset)
73
- scrollbar:SetWidth(7)
71
+ scrollbar:SetPoint("TOPRIGHT", -rightInset, -topInset - 2)
72
+ scrollbar:SetPoint("BOTTOMRIGHT", -rightInset, bottomInset + 2)
73
+ scrollbar:SetWidth(12)
74
74
  scrollbar:SetMinMaxValues(0, 0)
75
75
  scrollbar:SetValue(0)
76
76
  scrollbar:SetValueStep(1)
77
77
  scrollbar:SetObeyStepOnDrag(false)
78
- scrollbar:SetHitRectInsets(-4, -4, 0, 0)
78
+ scrollbar:SetHitRectInsets(0, 0, 0, 0)
79
79
  scrollbar.syncing = false
80
80
 
81
- local track = scrollbar:CreateTexture(nil, "BACKGROUND")
82
- track:SetColorTexture(Theme.textDim[1], Theme.textDim[2], Theme.textDim[3], 0.35)
83
- track:SetPoint("TOP", 0, 0)
84
- track:SetPoint("BOTTOM", 0, 0)
85
- track:SetWidth(2)
86
-
81
+ -- Match Lychee's quiet, trackless red thumb with a wider drag target.
82
+ -- Keep native Slider input; no custom per-frame drag loop is needed.
87
83
  local thumb = scrollbar:CreateTexture(nil, "ARTWORK")
88
- thumb:SetColorTexture(Theme.textDim[1], Theme.textDim[2], Theme.textDim[3], 0.72)
89
- thumb:SetSize(7, 32)
84
+ thumb:SetColorTexture(ACCENT_R, ACCENT_G, ACCENT_B, 1)
85
+ thumb:SetSize(3, 32)
90
86
  scrollbar:SetThumbTexture(thumb)
91
87
  scrollbar.thumb = thumb
92
88
 
93
89
  scrollbar:SetScript("OnEnter", function(self)
94
- self.thumb:SetColorTexture(ACCENT_R, ACCENT_G, ACCENT_B, 0.95)
90
+ self.thumb:SetColorTexture(Theme.accentHover[1], Theme.accentHover[2], Theme.accentHover[3], 1)
95
91
  end)
96
92
  scrollbar:SetScript("OnLeave", function(self)
97
- self.thumb:SetColorTexture(Theme.textDim[1], Theme.textDim[2], Theme.textDim[3], 0.72)
93
+ self.thumb:SetColorTexture(ACCENT_R, ACCENT_G, ACCENT_B, 1)
98
94
  end)
99
95
  scrollbar:SetScript("OnValueChanged", function(self, value)
100
96
  if not self.syncing then
@@ -188,7 +184,7 @@ local function CreateScrollArea(parent, leftInset, topInset, rightInset, bottomI
188
184
  if not (issecretvalue and issecretvalue(trackHeight))
189
185
  and trackHeight and trackHeight > 0 and viewHeight > 0 then
190
186
  local contentHeight = math.max(viewHeight, viewHeight + range)
191
- scrollbar.thumb:SetHeight(math.max(28, math.floor(trackHeight * viewHeight / contentHeight + 0.5)))
187
+ scrollbar.thumb:SetHeight(math.min(trackHeight, 48, math.max(24, math.floor(trackHeight * viewHeight / contentHeight + 0.5))))
192
188
  end
193
189
  scrollbar:Show()
194
190
  end
@@ -351,14 +347,17 @@ local function ApplyButtonState(button, state)
351
347
  local selected = variant == "selected"
352
348
  local primary = variant == "primary" or variant == "danger"
353
349
  local field = variant == "field"
354
- local background = field and Theme.field or primary and Theme.action or selected and Theme.surfaceSelected or Theme.surfaceHover
355
- button.lycheeSurface:SetColor(background, (field or selected or primary or state == "hover" or state == "pressed") and 1 or 0)
350
+ local secondary = variant == "secondary"
351
+ local interacting = enabled and (state == "hover" or state == "pressed")
352
+ local background = field and Theme.field or selected and Theme.surfaceSelected
353
+ or interacting and Theme.surfaceSelected or Theme.action
354
+ button.lycheeSurface:SetColor(background, (field or selected or primary or secondary or interacting) and 1 or 0)
356
355
  local color = not enabled and Theme.disabled
357
- or state == "hover" and Theme.accentHover
356
+ or interacting and (primary and Theme.accentHover or Theme.text)
358
357
  or variant == "danger" and Theme.danger
359
358
  or primary and Theme.accentHover
360
359
  or selected and Theme.text
361
- or Theme.textMuted
360
+ or secondary and Theme.text or Theme.textMuted
362
361
  button.label:SetTextColor(color[1], color[2], color[3], 1)
363
362
  end
364
363
 
@@ -545,14 +544,18 @@ local function CreatePageHeading(parent, title, help)
545
544
  return label
546
545
  end
547
546
 
548
- local function CreateListRow(parent, height)
547
+ local function CreateListRow(parent, height, quiet)
549
548
  local row = CreateFrame("Button", nil, parent)
550
549
  row:SetHeight(height)
551
550
 
552
551
  local background = row:CreateTexture(nil, "BACKGROUND")
553
- background:SetAllPoints()
552
+ background:SetPoint("TOPLEFT", 0, -2)
553
+ background:SetPoint("BOTTOMRIGHT", 0, 2)
554
554
  background:SetColorTexture(0, 0, 0, 0)
555
555
  row.background = background
556
+ if quiet then
557
+ row.selectionSurface = Theme.CreateRoundedSurface(row, {0, 0, 0, 0}, {radius = 6, inset = 2})
558
+ end
556
559
 
557
560
  local accent = row:CreateTexture(nil, "ARTWORK")
558
561
  accent:SetColorTexture(ACCENT_R, ACCENT_G, ACCENT_B, 1)
@@ -560,6 +563,7 @@ local function CreateListRow(parent, height)
560
563
  accent:SetSize(2, 22)
561
564
  accent:Hide()
562
565
  row.accent = accent
566
+ if quiet then accent:SetPoint("LEFT", 4, 0);accent:SetHeight(18) end
563
567
 
564
568
  row.divider = row:CreateTexture(nil, "ARTWORK")
565
569
  row.divider:SetColorTexture(0, 0, 0, 0)
@@ -567,6 +571,12 @@ local function CreateListRow(parent, height)
567
571
  end
568
572
 
569
573
  local function SetListRowState(row, selected, hovered)
574
+ if row.selectionSurface then
575
+ row.background:SetColorTexture(0, 0, 0, 0)
576
+ row.selectionSurface:SetColor(selected and Theme.listSelected or hovered and Theme.surfaceHover or {0, 0, 0, 0})
577
+ row.accent:SetShown(selected == true)
578
+ return
579
+ end
570
580
  if selected then
571
581
  row.background:SetColorTexture(unpack(Theme.surfaceSelected))
572
582
  row.accent:Show()
@@ -59,7 +59,6 @@ local exportHooks = {}
59
59
  local secondaryRoot
60
60
  local secondarySource
61
61
  local backButton
62
- local settingsPage
63
62
  local pageViewport, pageCanvas
64
63
  local pageOffsets = {}
65
64
  local UpdateRailVisibility
@@ -77,7 +76,6 @@ local function HideSecondary()
77
76
  if secondaryRoot.content then secondaryRoot.content:Hide() end
78
77
  secondarySource = nil
79
78
  backButton:Hide()
80
- if windowFrame.settingsButton then windowFrame.settingsButton:SetActive(false) end
81
79
  for key, tab in pairs(windowFrame.pageTabs) do tab:SetActive(key == activeKey) end
82
80
  if pageViewport then pageViewport:Show() end
83
81
  if windowFrame.FitPageViewport then windowFrame.FitPageViewport() end
@@ -159,7 +157,6 @@ local function ActivatePage(key)
159
157
  end
160
158
  if built then Theme.Reveal(built.container) end
161
159
  for pageKey, tab in pairs(windowFrame.pageTabs) do tab:SetActive(pageKey == key) end
162
- if windowFrame.settingsButton then windowFrame.settingsButton:SetActive(false) end
163
160
  if windowFrame.ScrollTabIntoView then windowFrame.ScrollTabIntoView(key) end
164
161
  UpdateRailVisibility()
165
162
 
@@ -182,8 +179,8 @@ local function CreateHistoryRail()
182
179
  local label = W.CreateSectionLabel(railRoot, ns.L.HISTORY)
183
180
  label:SetPoint("TOPLEFT", 3, 0)
184
181
 
185
- local panel = W.CreatePanel(railRoot, colors.panel[1], colors.panel[2], colors.panel[3], 1)
186
- panel:SetPoint("TOPLEFT", 0, -20)
182
+ local panel = W.CreatePanel(railRoot, colors.editor[1], colors.editor[2], colors.editor[3], 1)
183
+ panel:SetPoint("TOPLEFT", 0, Layout.CONTENT_TOP - Layout.HEADING_TOP)
187
184
  panel:SetPoint("BOTTOMLEFT", 0, 0)
188
185
  panel:SetWidth(HISTORY_WIDTH)
189
186
 
@@ -339,25 +336,7 @@ local function EnsureWindow()
339
336
  backButton:Hide()
340
337
  frame.backButton = backButton
341
338
 
342
- local settingsButton = W.CreateNavTab(header, ns.L.SETTINGS)
343
- settingsButton:SetSize(SIDEBAR_WIDTH - 20, 40)
344
- settingsButton:SetPoint("BOTTOMLEFT", header, "BOTTOMLEFT", 10, 16)
345
- local function ShowSettings()
346
- if not settingsPage then
347
- settingsPage=ns.SettingsPage.Create(secondaryRoot,function()
348
- return frame:GetWidth()-SIDEBAR_WIDTH-22
349
- end)
350
- end
351
- settingsPage.RefreshBindingFields()
352
- settingsPage.FitContent()
353
- ns.Workbench.ShowSecondary(settingsPage)
354
- return true
355
- end
356
- settingsButton:SetScript("OnClick", ShowSettings)
357
- frame.settingsButton = settingsButton
358
- frame.ShowSettings = ShowSettings
359
-
360
- local navScroll = W.CreateScrollArea(header, 10, 86, 10, 72)
339
+ local navScroll = W.CreateScrollArea(header, 10, 86, 10, 16)
361
340
  local navContent = CreateFrame("Frame", nil, navScroll)
362
341
  navContent:SetSize(SIDEBAR_WIDTH - 32, #pageOrder * 44)
363
342
  navScroll:SetScrollChild(navContent)
@@ -468,14 +447,6 @@ ns.Workbench = {
468
447
  return ActivatePage(key)
469
448
  end,
470
449
 
471
- ShowSettings = function()
472
- local shown, reason = ns.Workbench.Open()
473
- if not shown then return false, reason end
474
- return windowFrame.ShowSettings()
475
- end,
476
-
477
- GetSettingsPage = function() return settingsPage end,
478
-
479
450
  GetActivePage = function()
480
451
  return activeKey
481
452
  end,
@@ -494,9 +465,6 @@ ns.Workbench = {
494
465
  windowFrame.pageNext:Hide()
495
466
  if railRoot then railRoot:Hide() end
496
467
  for _, tab in pairs(windowFrame.pageTabs) do tab:SetActive(false) end
497
- if windowFrame.settingsButton then
498
- windowFrame.settingsButton:SetActive(content == settingsPage)
499
- end
500
468
  backButton:Show()
501
469
  content:Show()
502
470
  secondaryRoot:Show()