Adjacent placeholder anchors, like a JS-driven nav, ran together as
HomeAbout. Keep the standalone line placement linked anchors get and
drop only the link syntax.
`lightpanda version.io` was rejected as a misspelt `version`, 3 edits
within the length-scaled limit. Like curl, it fetches now: the command check
shares --dump's isUrlLike.
Following some experimentation, this sets M_MMAP_THRESHOLD to 128K on linux
builds IF it isn't explicit set, e.g. via the `MALLOC_MMAP_THRESHOLD_` env. This
allows users explicitly set it if they want.
I've been looking at this for a while, but my understanding is still basic. The
simplistic explanation is that glibc's allocator internally uses arenas.
Allocations above THRESHOLD skip these arenas and are allocated directly from
and freed directly to the OS. Allocations under this threshold are released
to the arena where they can be re-used. Everything works OK, EXCEPT for when it
comes time to release the memory from these arenas back to the OS. If free arena
memory is pinned under live memory, it cannot be released.
Various online posts / comments reference glibc as suffering from significant
fragmentation and "holding" onto memory. That's the behavior that we've seen.
Further, calls to malloc_trim reclaim the lost memory, so what we're seeing
aren't leaks.
Since AttachedSession is already heap-based, it's inspector_session is at a
fixed address and thus can own the session.
Also, hook in some noop callbacks on deinit.
Encode the !important'ness of a rule into its priority (we have the bit to
spare). This keeps the !important calculation the build-side, not the read side
and is more consistent with how the StyleManager generally works.
CSSStyleDeclaration `getPropertyValue` is now !important aware. Whereas before
an inline value would always win, it now cedes to an !important stylesheet rule
While the token list itself is readonly, the attribute itself is settable. For
example, HTMLOutputElement's htmlFor says:
"Although the htmlFor property itself is read-only in the sense that you can't
replace the DOMTokenList object, you can still assign to the htmlFor property
directly"
`Inspector` now supports several sessions; `startSession` allocates one (the V8 channel keeps its address) and `stopSession` frees it. They all connect to the same context group so every session see every context.
`BrowserContext.session_id` stays the primary session's id for the many event call sites.
Tag chips like <a class="tag">x</a> pushed short quotes on
quotes.toscrape.com/js/ over the 0.2 link-density limit, so
--strip-mode clutter pruned them as navigation.
Playwright's `browserContext.newCDPSession` must get its response on that session, not the primary one. Playwright keys its pending callbacks by session, finds none for that id, and throws
"Assertion error", which takes the whole process down.
Addresses #1838 and #1839.
`fetch --dump markdown.com` was rejected as a misspelt `markdown`: the
length-scaled limit allows 4 edits for 12 characters. No format has a `.`,
`/` or `:`, so an argument with one is always the url.
`--log-filter -cdpp` suggested `cdp`; invalidChoice now takes the stripped
prefix and puts it back on the value and the suggestion.
closest stripped a leading `--`, a CLI convention in a helper the agent's
slash commands share too. It now leaves out whatever prefix every
candidate starts with: `--` for flags, nothing for commands and values.
`cli.invalidChoice` logs a bad value with its closest match, and the
generic enum path, --dump, --log-level, --log-format and now --log-filter
all use it. editDistance lowercases its inputs once, and closest strips
exactly a leading `--`, as its doc says.
A flat limit of two edits was too loose for short words and too strict
for long ones: `--dump md` suggested `pdf`, and a bare word within two
edits of `run` or `mcp` was rejected as a mistyped command instead of
being fetched, while `--insecure-disable-tls-verification` got no
suggestion at all. `closest` now allows about one edit per three
characters, as rustc does, not counting a leading `--`, and swapping two
adjacent characters counts as one edit so `--dmup` still finds `--dump`.
`--log-level` and `--log-format` now suggest the closest value too.
select() delegated to setSelectionRange(), which throws InvalidStateError
for input types where the selection API doesn't apply (email, number,
date, ...). Per spec select() never throws.
email and number still have selectable text, so they now keep the
internal selection/caret: select() + Input.insertText replaces the
value like Chrome. This is what Playwright's locator.fill() does, which
failed with 'locator.fill: undefined' on type=email.