Add the Chrome fallback and the needs-human flow.

Bot checks escalate to headless Chrome with stealth, which claims the
same identity as tls-client and hands its cookies back to the jar. The
visit counts against the rate limits. If Chrome can't clear a check,
the URL is marked needs-human. Pressing Enter on it in the TUI, or
running 'dibs solve', opens a visible window; dibs carries on once the
page loads. Processes now merge the cookie file on save, with the
newest cookie winning.
This commit is contained in:
Overlord committed 2026-10-14 14:08:56 +02:00
1 parent f2ea1297e8
commit e2cbc1a55c
20 files changed
+905 -73

No files matched your search

+17 -13
View File
@@ -22,6 +22,7 @@ var (
yellow = lipgloss.NewStyle().Foreground(lipgloss.Color("11"))
red = lipgloss.NewStyle().Foreground(lipgloss.Color("9"))
blue = lipgloss.NewStyle().Foreground(lipgloss.Color("12"))
magenta = lipgloss.NewStyle().Foreground(lipgloss.Color("13")).Bold(true)
selected = lipgloss.NewStyle().Reverse(true)
flashing = lipgloss.NewStyle().Background(lipgloss.Color("10")).Foreground(lipgloss.Color("0")).Bold(true)
)
@@ -34,14 +35,14 @@ var columns = []struct {
title string
min, max int
} {
{"ITEM", 8, 32},
{"SHOP", 4, 12},
{"TLD", 3, 6},
{"STATUS", 9, 9},
{"PRICE", 5, 16},
{"SELLER", 6, 11},
{"LAST", 10, 10},
{"NEXT", 9, 9},
{"ITEM", 8, 32},
{"SHOP", 4, 12},
{"TLD", 3, 6},
{"STATUS", 11, 11},
{"PRICE", 5, 16},
{"SELLER", 6, 11},
{"LAST", 10, 10},
{"NEXT", 9, 9},
}
// layout sizes the table and the log pane to the window.
@@ -160,6 +161,8 @@ func statusStyle(status string) lipgloss.Style {
return green
case statusBlocked:
return yellow
case statusNeedsHuman:
return magenta
case statusError:
return red
case statusPaused:
@@ -208,10 +211,11 @@ func (m *Model) statusBar() string {
status string
style lipgloss.Style
} {
{statusAvailable, green},
{statusBlocked, yellow},
{statusError, red},
{statusPaused, faint},
{statusAvailable, green},
{statusNeedsHuman, magenta},
{statusBlocked, yellow},
{statusError, red},
{statusPaused, faint},
} {
if n := m.count(s.status); n > 0 { parts = append(parts, s.style.Render(fmt.Sprintf("%d %s", n, s.status))) }
}
@@ -233,7 +237,7 @@ func (m *Model) statusBar() string {
func (m *Model) help() string {
if m.logFocus { return "↑↓ pgup pgdn scroll · l/esc back to the table · r reload · q quit" }
return "↑↓ select · p pause · P pause all · c check now · o open page · enter cart · l log · r reload · q quit"
return "↑↓ select · p pause · P pause all · c check now · o open page · enter cart or bot check · l log · r reload · q quit"
}
// count is the number of rows showing status.