Skip to content

Conversation

@giordano-lucas
Copy link
Member

@giordano-lucas giordano-lucas commented Jan 29, 2026

  • Filter out nil fields globally in text formatter instead of showing
  • Add custom formatters for page execute responses (hide Session field)
  • Add page observe command that returns page description
  • Make page scrape instruction argument optional
  • Add shared PrintScrapeResponse helper for consistent scrape output
  • Update all scrape commands to use the shared helper

Greptile Overview

Greptile Summary

This PR improves CLI output formatting and adds new functionality. The changes include:

  • Globally filters out nil fields in text formatter instead of displaying <nil>
  • Adds PrintScrapeResponse helper function for consistent scrape output formatting across all scrape commands
  • Adds new page observe command that displays page description
  • Makes page scrape instructions argument optional
  • Adds custom printExecuteResponse formatter to hide Session field in text mode for execute responses
  • Updates all scrape-related commands (scrape, page scrape, session scrape) to use the shared helper
  • Includes comprehensive test coverage for new functionality

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are well-tested with comprehensive unit tests, the refactoring consolidates duplicate code into a shared helper, and the new functionality follows existing patterns in the codebase
  • No files require special attention

Important Files Changed

Filename Overview
internal/output/text.go improved nil field filtering to hide nil pointers, slices, maps, and interfaces globally in text formatter
internal/cmd/output_helpers.go added PrintScrapeResponse helper for consistent scrape output formatting across commands
internal/cmd/page.go added page observe command, made scrape instructions optional, added custom formatter for execute responses

- Filter out nil fields globally in text formatter instead of showing <nil>
- Add custom formatters for page execute responses (hide Session field)
- Add `page observe` command that returns page description
- Make `page scrape` instruction argument optional
- Add shared PrintScrapeResponse helper for consistent scrape output
- Update all scrape commands to use the shared helper

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@giordano-lucas giordano-lucas merged commit db8b853 into main Jan 29, 2026
1 of 2 checks passed
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