Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

update logging#1201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
tkattkat wants to merge4 commits intomain
base:main
Choose a base branch
Loading
fromupdate-logging
Open

update logging#1201

tkattkat wants to merge4 commits intomainfromupdate-logging

Conversation

@tkattkat
Copy link
Collaborator

@tkattkattkattkat commentedOct 29, 2025
edited
Loading

why

currently, log level one has too many noisy logs, and not enough basic ones

what changed

moved various logs to level 2
added logs for act extract and observe on level one with the method being called, and the instruction

image

test plan

greptile-apps[bot] reacted with thumbs up emoji
@changeset-bot
Copy link

changeset-botbot commentedOct 29, 2025
edited
Loading

🦋 Changeset detected

Latest commit:4d56ded

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@browserbasehq/stagehandPatch
@browserbasehq/stagehand-evalsPatch

Not sure what this means?Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@greptile-appsgreptile-appsbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Greptile Overview

Greptile Summary

This PR refactors the logging system to reduce noise at log level 1 while adding more useful high-level operation logs.

Key Changes:

  • Added level 1 logs foract,extract, andobserve operations showing the instruction/description being executed
  • Moved auxiliary fields (like instruction text) directly into log messages using bracket notation (e.g.,[act] click the button)
  • Demoted noisy internal logs to level 2: LLM responses, navigation checks, iframe handling, and URL detection
  • SimplifiedhandlePossibleNavigation signature by removing unusedactionDescription andxpath parameters

Impact:
Level 1 logging now provides a cleaner view focused on user-facing operations, while level 2 captures detailed internal mechanics for debugging.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are purely cosmetic logging improvements with no behavioral modifications. All function signature changes are correctly propagated to call sites, and the logging level adjustments follow a clear and consistent pattern throughout the codebase.
  • No files require special attention

Important Files Changed

File Analysis

FilenameScoreOverview
packages/core/lib/v3/handlers/actHandler.ts5/5Added level 1 logging foract calls with instruction text
packages/core/lib/v3/handlers/extractHandler.ts5/5Simplified extraction logging - moved instruction to message from auxiliary field
packages/core/lib/v3/handlers/handlerUtils/actHandlerUtils.ts5/5Moved various action utility logs from level 1 to level 2, simplifiedhandlePossibleNavigation signature
packages/core/lib/v3/handlers/observeHandler.ts5/5Simplified observation logging - moved instruction to message from auxiliary field

Sequence Diagram

sequenceDiagram    participant User    participant Stagehand    participant ActHandler    participant ExtractHandler    participant ObserveHandler    participant v3Logger        User->>Stagehand: act(instruction)    Stagehand->>ActHandler: act()    ActHandler->>v3Logger: log [act] instruction (level 1)    ActHandler->>ActHandler: doObserveAndAct()    ActHandler->>v3Logger: log internal details (level 2)    ActHandler-->>User: ActResult        User->>Stagehand: extract(instruction)    Stagehand->>ExtractHandler: extract()    ExtractHandler->>v3Logger: log [extract] instruction (level 1)    ExtractHandler->>ExtractHandler: perform extraction    ExtractHandler-->>User: ExtractionResult        User->>Stagehand: observe(instruction)    Stagehand->>ObserveHandler: observe()    ObserveHandler->>v3Logger: log [observe] instruction (level 1)    ObserveHandler->>ObserveHandler: analyze DOM    ObserveHandler-->>User: Action[]        Note over v3Logger: Level 1: High-level operations<br/>Level 2: Internal details/debugging
Loading

5 files reviewed, no comments

Edit Code Review Agent Settings |Greptile

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

Reviewers

1 more reviewer

@greptile-appsgreptile-apps[bot]greptile-apps[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@tkattkat

[8]ページ先頭

©2009-2025 Movatter.jp