Skip to content

fix: improve network log readability and copying#10062

Open
princepal9120 wants to merge 2 commits intowarpdotdev:masterfrom
princepal9120:prince/improve-network-log-usability
Open

fix: improve network log readability and copying#10062
princepal9120 wants to merge 2 commits intowarpdotdev:masterfrom
princepal9120:prince/improve-network-log-usability

Conversation

@princepal9120
Copy link
Copy Markdown
Contributor

Summary

  • Format network log request/response entries into readable fields instead of raw debug blobs
  • Preserve raw/plain-text snapshots for copying and add a Copy all header action
  • Separate entries with blank lines and cover snapshot behavior in tests

Fixes #9716

Testing

  • git diff --check
  • Not run: cargo test -p app network_logging --lib because cargo is not installed in this environment.

@cla-bot cla-bot Bot added the cla-signed label May 4, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 4, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 4, 2026

@princepal9120

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR reformats network log entries for display, preserves a plain-text copy snapshot, and adds a Copy all header action.

Concerns

  • The new header layout uses Flex::new(vec![...]), .gap(...), and Length, which do not match the existing Warp UI API and will not compile.
  • Refreshing an initially empty pane updates latest_plain_text without notifying the view, so the header can remain rendered without the Copy all button after entries appear.

Found: 1 critical, 1 important, 0 suggestions

Verdict

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/server/network_log_view.rs Outdated
left_of_overflow: Some(if self.snapshot_is_empty() {
self.render_refresh_button(app)
} else {
Flex::new(vec![self.render_copy_button(app), self.render_refresh_button(app)])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚨 [CRITICAL] This does not compile: Flex::new expects an Axis, and this codebase uses Flex::row().with_spacing(...).with_child(...); Length/.gap() are not available, so the new import is also unresolved.

let snapshot = NetworkLogModel::as_ref(ctx).snapshot_text();
pub fn reload_snapshot(&mut self, ctx: &mut ViewContext<Self>) {
let snapshot = NetworkLogModel::as_ref(ctx).snapshot();
self.latest_plain_text = snapshot.plain_text;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] After changing latest_plain_text, notify this view; otherwise refreshing an initially empty pane after entries arrive can update the editor while leaving the header rendered without the Copy all button.

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Network log is almost unusable

1 participant