You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d45ec86
Browse filesBrowse the repository at this point in the historyBrowse files
ADFA-5472: Revert two fixes from the last round that made things worse
Eleven of twelve findings. Two of them are mine from the previous round,
and both were wrong in the same way: I took a reviewer's suggestion at
face value without checking the surrounding facts.
destroy() must not clear the caches. I added that clearing last round on
the grounds that it "costs nothing and removes the whole class of
staleness". It costs plenty: EditorActivityLifecyclerObserver.onPause
calls EditorActivityActions.clearActions(), which calls destroy() on every
action in this location, and onResume registers fresh ones. So destroy()
runs on every backgrounding, not at teardown. The clearing therefore threw
the verdict cache away on each background/foreground cycle -- so the item
went missing from the first menu open after every resume -- and clearing
the in-flight set alongside it let a still-running job's completion release
a claim the next cycle's job had already taken, which is exactly the
duplicate work the claim exists to prevent. Reverted, with the pause/resume
fact recorded so the suggestion is not retried.
isDeepLinkTargetOfOpenProject keeps its per-side fallback. I collapsed it
to `deepLinkTargetOfOpenProjectOrNull(...) ?: false` last round and
asserted in the commit message that this "is not a behaviour change ...
the answer was false either way". It is a behaviour change: the old form
compares per side, so when exactly one side's canonicalPath fails it still
compares that side's absolutePath against the other's canonical path, and
those can match. At this function's two callers a false means a
same-project deep link is treated as a project switch -- the project is
closed and reopened instead of the file being shown. The two functions now
differ deliberately: lenient for callers that must answer now, strict for
the one caller that remembers the answer. That also makes the KDoc true
again, including its [canonicalOrAbsolute] link.
The rest:
The popup is bounded to the room below its anchor. WRAP_CONTENT reports
height -2 to showAsDropDown, whose fit check is then trivially satisfied,
so the content was measured against the whole display and the ScrollView
believed it fit. capHeightToSpaceBelow measures and caps against
getMaxAvailableHeight, at both call sites. It leaves the popup alone when
the content already fits, so a bad measurement degrades to the previous
behaviour rather than a zero-height window.
The manifest guard now pins host and scheme, not just the path. An
intent-filter matches on all three, so changing CANONICAL_HOST or SCHEME
breaks delivery exactly as changing the prefix does -- and the path-only
assertion stayed green through both.
The one-based cursor conversion is named and tested. It is called an
invariant twice in ARCHITECTURE.md and had no test at any level; dropping
a `+ 1` fails silently, because buildUrl then refuses the link and the item
merely disappears. oneBasedCursorPosition is now covered directly, plus a
test showing the raw zero-based values produce no link at all -- which is
why the conversion is load-bearing rather than cosmetic. That test needed
a real android.net.Uri, so CreateLinkActionTest gains the Robolectric
runner its siblings already use.
projectsRoot() failing is reported as false, not null. null means "ask
again shortly" and there is nothing to wait for, so the item was hidden
forever while the code promised a retry; the catch is also narrow now,
because runCatching there swallowed Error while a comment twenty lines
below explicitly rejected runCatching for that reason.
Corrected comments rather than leaving them: onNewIntent's claim that the
same-project check is "disk-free" (it falls through to two canonicalPath
calls on the main thread), prepare()'s hide-silently rationale (which did
not cover the length ceiling, a property of the FILE -- so the item comes
and goes as the user switches between a deep and a shallow tab), and a
note that the shared rule's name half is trivially satisfied at this call
site because the name is derived from the path being compared.
Deferred: the shared "close options" tooltip is now ADFA-5477, with the
two blockers recorded there.
Also worth recording: every `:app:spotlessApply` in this branch's history
silently did nothing -- there is no such task, only a root-level
`spotlessApply`, and the "task not found" failure looked like the daemon
noise I had been seeing. That is why the hook kept finding work.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gw89A3KWsPtvgPYtXYLBwr
0 commit comments