Skip to content

fix(ui): keep the Ask button off the page's buttons - #396

Merged
adeelahmad merged 5 commits into
mainfrom
claude/project-thread-e627xj
Oct 15, 2026
Merged

adeelahmad merged 5 commits into
mainfrom
claude/project-thread-e627xj

Conversation

@adeelahmad

@adeelahmad adeelahmad commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the floating Ask button sat on whatever was in the bottom-right corner. On the Import page it covered Import N files, and pages had to leave room for it by hand (phone-actions, the Settings save row's sm:pr-[120px]), so any page that didn't was covered.

After: when a button or field is under the Ask button and scrolling can't move it clear (a row of buttons pinned to the bottom of the screen, or the last button with the page at its end), the Ask button rises above it. If rising would take it past the middle of the screen (the end of a form on a phone, where every row is a field), it steps out of sight until the corner is clear. Dialogs, drawers and toasts drawn over it don't move it. Mid-page content that scrolls past it is left alone, as with any floating button.

Motivation and Context

Adeel: "Ask AI button on bottom covers the import and other submit form buttons on diff pages". The clicks survey had recorded it too: /import Import "covered by something else on the page" in baseline.json.

How: components/page-chat/ask-place.ts. A transparent probe the button's size sits just under it in the stacking order. On scroll, resize and page changes (at most once a frame) the probe is briefly made hit-testable, and document.elementsFromPoint over a 5×3 grid gives what the button would cover: the element right under the probe, so anything drawn over the button is ignored. A control there (button, link, field, ARIA role, or a clickable row) counts when it's in a bar that is fixed or stuck to the bottom, or when its scrollers can't carry it above the button. The button then rises above the control (or the whole bar), and checks again up there.

Checks against regressions: the clicks survey fails a journey whose control the Ask button covers, and scrolls every page (computer and phone) to its end and fails on any control right under the button ("Covered by the Ask button" in the results).

Also in this PR, to get Clicks green (both were red on main):

Screenshots (if appropriate):

Before (main, 1400×900): the Ask button over Import 1 file. After: it sits above the row. On a phone at the end of the Import form it steps out of sight. Screenshots are in the project thread.

Steps to reproduce (if appropriate):

Import → Upload → choose a file: the sticky row's Import 1 file is under the Ask button.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions (AGENTS.md)

  • Goal: the Ask button no longer covers Import or other controls; merged on green CI.
  • Agents: n/a, a layout fix in the web app.
  • Zero setup: nothing new to install or set.
  • Fewest clicks and keystrokes: the covered Import step no longer needs a scroll or the keyboard.
  • Configurable: n/a, no new setting.
  • Light: client-side only, a few hit tests per frame at most while the page changes.
  • Private and secure: n/a, no new surface.
  • Cost: n/a, no model calls.
  • User decides: the button still opens the same chat; defaults unchanged.
  • Upgrades: n/a, no stored data.
  • Honest: the changelog says what changed and what is left alone (mid-page content that scrolls past it).
  • Tests, docs and generated files updated: __tests__/ask-place.test.tsx, __tests__/update-banner.test.tsx; the clicks survey checks; docs/assistant.md, docs/frontend.md, CHANGELOG.md.
  • Open standards; no new dependencies.
  • Result reported with evidence. Refine later: the phone-actions padding and the Settings save row's right padding are no longer needed for the Ask button and could go.

Evidence (local clicks survey):

  • main with the new check: FAIL import-file: Import is covered by the floating Ask button.
  • This branch: all 33 journeys pass on a computer; on a phone every journey passes and the Import button is clickable, with the Ask button out of sight at the form's end.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KaZgCPYVesfDJhLzGCKJXX

The floating Ask button sat on whatever was in the bottom-right corner, such as
Import on the Import page. It now finds what it would cover with the browser's
own hit testing (a transparent probe just under it) and rises above any control
there that scrolling can't carry clear: one in a bar fixed or stuck to the
bottom, or with the page at its end. With no room to rise it steps out of
sight. Dialogs, drawers and toasts drawn over it don't move it.

The clicks survey now fails a journey whose control the Ask button covers, and
checks every page scrolled to its end for controls under it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaZgCPYVesfDJhLzGCKJXX
@adeelahmad adeelahmad self-assigned this Oct 15, 2026
…s empty end

The survey's page check counted fields a closed fold keeps out of sight; it now
checks the control is what lies right under the button. Labels no longer push
the button up: their empty end isn't somewhere people tap.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaZgCPYVesfDJhLzGCKJXX
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaZgCPYVesfDJhLzGCKJXX

# Conflicts:
#	CHANGELOG.md
Both were red on main. The update banner pushed pages that fill the screen
(Chat, the graph, a recording) below the fold, so the phone's question box needed
a swipe: ported from #393, the banner sets --lens-banner to its height and those
pages leave it room. Merging from the graph needs Raspberry Pi linked twice,
which takes the second import's analysis: the journey now waits for the jobs to
finish, as other journeys wait for background work.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaZgCPYVesfDJhLzGCKJXX
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaZgCPYVesfDJhLzGCKJXX

# Conflicts:
#	CHANGELOG.md
adeelahmad pushed a commit that referenced this pull request Oct 15, 2026
The journey failed now and then (on main too) with a 20 s timeout: an entity
is in the graph once something links it twice, which takes import-file's
episode as well, and a slow runner can still be reading it. The same wait as
in #396, not counted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb
adeelahmad pushed a commit that referenced this pull request Oct 15, 2026
The journey failed now and then (on main too) with a 20 s timeout: an entity
is in the graph once something links it twice, which takes import-file's
episode as well, and a slow runner can still be reading it. The same wait as
in #396, not counted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb
@adeelahmad
adeelahmad marked this pull request as ready for review October 15, 2026 11:52
@adeelahmad
adeelahmad merged commit a749634 into main Oct 15, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-e627xj branch October 15, 2026 11:53
adeelahmad added a commit that referenced this pull request Oct 15, 2026
…to (#397)

* feat(notes): find a note by its words, on the Notes page and in Jump to

The Notes page gets a search box (title, summary and text, the pages of things too,
with the words around each match marked; Enter opens the first), a Projects / Areas /
Resources / Archive filter with counts, and the notes each note sits inside. Jump to
(Ctrl+K) finds notes as well. GET /api/v1/notes/search serves both, and find_notes
gives agents the words around each match and the note it's inside.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb

* test(clicks): graph-merge waits for the imports' jobs to finish

The journey failed now and then (on main too) with a 20 s timeout: an entity
is in the graph once something links it twice, which takes import-file's
episode as well, and a slow runner can still be reading it. The same wait as
in #396, not counted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb

---------

Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
adeelahmad added a commit that referenced this pull request Oct 15, 2026
)

* feat(sources): Connect with Google for Google Calendar connections

A Google Calendar connection signs in to a Google account from a button:
Lens saves the connection, opens Google's consent screen for read-only
calendar access, and Google sends the browser back to Sources with the
account connected and its calendars open. The OAuth client is the Google
sign-in provider's, an earlier connection's, or one entered in the form,
which shows the redirect URI to register. A connection whose sign-in
stopped working gets "Connect Google account" on its row.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CGVfwJfXV4MiUhSyusia64

* feat(sources): connect Google from the web app only, through POST /sources/{id}/google

Matches the Gmail source's route and rules so both types share one flow:
API tokens are refused (the consent comes back to the browser that
asked), the admin who started it must still be one when Google sends
them back, a type's SCOPES can depend on its settings, and a type names
the parameter that records the connected account (ACCOUNT).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CGVfwJfXV4MiUhSyusia64

* test(clicks): graph-merge waits for the imports' jobs to finish

The journey failed now and then (on main too) with a 20 s timeout: an entity
is in the graph once something links it twice, which takes import-file's
episode as well, and a slow runner can still be reading it. The same wait as
in #396, not counted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb

---------

Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants