"Contains" page watch never matches when its text has a trailing space · Issue #184 · CopilotKit/openmuse · GitHub
Skip to content

"Contains" page watch never matches when its text has a trailing space #184

Closed

Description

@RaphaelFakhri
  1. In the app, create a page watch with the condition "Text appears" and type In stock (a phone keyboard adds the trailing space after an autocompleted word).
  2. Point it at a page whose text includes In stock. or ends with In stock.
  3. Let the watch check the page.

Expected behavior

The watch matches and sends an alert.

Actual behavior

The watch reports "Watching" on every check and never alerts. The same happens when the value contains a double space or a line break.

Cause

AgentService.observe collapses whitespace in the page text before it searches, but compares monitor.value as typed. The new watch form in agent-ui.tsx trims the title and URL but sends the value untrimmed, and monitorInputSchema does not trim it either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions