Skip to content

feat(sources): watch a local folder in four clicks - #341

Merged
adeelahmad merged 8 commits into
mainfrom
claude/project-thread-1swqfa
Oct 14, 2026
Merged

adeelahmad merged 8 commits into
mainfrom
claude/project-thread-1swqfa

Conversation

@adeelahmad

@adeelahmad adeelahmad commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: watching a folder on this machine took 9 clicks on a computer (10 taps and a swipe on a phone): Sensors, the Files tab, Add connection, This machine, Test connection, Done, open the allowed folder, Watch this folder, Start watching. A local folder has nothing to fill in, yet it went through the test-and-name step, and the allowed folders couldn't be watched until one was opened.

After: 4 clicks (5 taps and a swipe on a phone): Sensors, Watch a local folder, Watch on the allowed folder, Start watching.

  • Watch a local folder, next to Manage in the Sensors page's "Files, email and calendars" section, opens this machine's allowed folders at once, on its connection (made on the way when there's none, as the setup wizard does).
  • At the allowed folders, each one has a Watch button; opening one to watch a folder inside still works.
  • Add connection → This machine adds, tests and names the connection in one go (named "Folder on this machine", as the test step suggested); the test step only shows if the test fails, with Discard, Keep anyway and Test again as before. This also applies where the same dialog is used in Settings and the setup wizard.

sources.local_roots stays startup-only: the browser still lists only the folders it allows.

Motivation and Context

Adeel asked to cut clicks, keys and touches; the survey (clicks-survey/latest.md) set watching a folder at 9 clicks with a target of 4.

Steps to reproduce (if appropriate):

Measured with ci/clicks/run.sh and ci/clicks/run.sh --device phone on a fresh install. baseline.json and baseline-phone.json are this branch's runs (after #325 merged); against main's baselines only the source-folder journey changes, and the Sensors page shows one more control (the new button).

Journey source-folder Before After
Computer (1400x900) 9 clicks 4 clicks
Phone (Pixel 7) 10 taps, 1 swipe 5 taps, 1 swipe

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). Prettier, ESLint and tsc pass.
  • I added or updated tests. watch-folder.test.tsx (Watch from the allowed folders; the Sources link reusing or making this machine's connection), add-connection.test.tsx (This machine added at once; test step only on failure; the usual flow on SMB), sensors-ui.test.tsx (the link); the source-folder clicks journey.
  • My change requires documentation updates, and I have updated docs/ accordingly. docs/sensors.md, In the web app.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions (AGENTS.md)

  • Goal: 9 clicks down to 4 on a computer, 10 taps to 5 on a phone; merges on green CI.
  • Agents: agents already do this in one call, PUT /api/v1/setup/storage with folder and namespace (it reuses or makes this machine's connection), or POST /api/v1/sources and POST /api/v1/watches.
  • Zero setup: no new prerequisite; the default install allows /audio.
  • Fewest clicks and keystrokes: 4 clicks, no keys.
  • Configurable: n/a, no new settings; sources.local_roots stays startup-only on purpose.
  • Light: n/a, frontend only, nothing new runs.
  • Private and secure: n/a, no new surface; the same admin-only endpoints, and only folders inside sources.local_roots.
  • Cost: n/a, no model calls.
  • User decides: Start watching (namespace, what's picked up, what runs) still waits for the user; defaults unchanged.
  • Upgrades: n/a, no stored-data change. An existing connection to this machine is reused.
  • Honest: docs describe only what's merged here.
  • Tests, docs and generated files updated (no API change, so no make openapi).
  • Open standards; no new dependencies.
  • Result reported with evidence (table above). Refine later: an MCP tool to watch a folder (the REST API does it today); with a single allowed folder, the Watch dialog could open straight away.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EH4TJFTrrDKy4pfzvbbPyT

Watch a local folder on the Sensors page opens this machine's allowed
folders straight away, on its connection (made on the way when there is
none). Each allowed folder has a Watch button, so it no longer has to be
opened first. Adding This machine as a connection skips the
test-and-name step unless its test fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EH4TJFTrrDKy4pfzvbbPyT
@adeelahmad adeelahmad self-assigned this Oct 10, 2026
adeelahmad added a commit that referenced this pull request Oct 11, 2026
…349)

"Stay private and safe" now covers flagging instruction-like text (patterns or the optional local classifier, #329,
#347), asking before the browser acts on what the assistant wrote (#333), breaking up links in chat-room answers
(#338), the archive as data over MCP (#343) and the audit log of what was caught (#344). "See what it costs" adds the
overall budget asked for in setup (#281). "In progress" drops what merged and adds #337, #341 and #346.


Claude-Session: https://claude.ai/code/session_01HDx7PPUauyjMn1LZs8JAsS

Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
The source-folder journey takes the new path (Sensors, Watch a local
folder, Watch, Start watching); baseline.json and baseline-phone.json
are this branch's runs. Only that journey and the Sensors page's
control count change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EH4TJFTrrDKy4pfzvbbPyT
@adeelahmad
adeelahmad marked this pull request as ready for review October 11, 2026 02:26
…-1swqfa

# Conflicts:
#	CHANGELOG.md
#	ci/clicks/baseline-phone.json
#	ci/clicks/baseline.json
Against main's baselines only source-folder changes (9 to 4 clicks, 10
to 5 taps) and the Sensors page shows one more control; the Telegram,
Slack and mailbox settings pages main added are now listed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EH4TJFTrrDKy4pfzvbbPyT
@adeelahmad
adeelahmad merged commit dd70f22 into main Oct 14, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-1swqfa branch October 14, 2026 10:32
@adeelahmad adeelahmad mentioned this pull request Oct 14, 2026
20 of 22 tasks
adeelahmad pushed a commit that referenced this pull request Oct 14, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014pKRz6HkdQ7hTqEbpnyhYo
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