Skip to content

Conversation

Udhay-Adithya
Copy link
Contributor

@Udhay-Adithya Udhay-Adithya commented Sep 9, 2025

PR Description

Adds a logging screen to APIDash to capture all outbound network traffic and in app javascript logs

Related Issues

  • Closes #

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all tests are passing

Added/updated tests?

  • Yes
  • No, and this is why: please replace this line with details on why tests have not been included

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@Udhay-Adithya
Copy link
Contributor Author

Empty State

image

With Data(Light)

image

With Data(Dark)

image

@Udhay-Adithya Udhay-Adithya changed the title Add a in app terminal logger in app terminal logger Sep 11, 2025
@Udhay-Adithya Udhay-Adithya marked this pull request as ready for review September 12, 2025 06:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a comprehensive logging system to APIDash that captures all outbound network traffic and JavaScript runtime logs. The implementation provides an in-app terminal view for developers to monitor API requests, JavaScript console output, and system events in real-time.

  • Introduces a new Terminal/Logs page accessible from both desktop navigation rail and mobile bottom navigation
  • Migrates JavaScript runtime management from service-based to provider-based architecture using Riverpod
  • Implements comprehensive logging for network requests, JavaScript execution, and system events

Reviewed Changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/screens/terminal/terminal_page.dart Main terminal interface with search, filtering, and log display
lib/providers/terminal_providers.dart Core terminal state management and logging functionality
lib/providers/js_runtime_notifier.dart Refactored JS runtime as Riverpod provider with terminal integration
lib/widgets/terminal_tiles.dart UI components for rendering different log entry types
lib/models/terminal/ Data models for terminal entries and log types
Various navigation files Added terminal page to desktop and mobile navigation
Test files Comprehensive test coverage for new terminal functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

});

group('Pre-request Script - Request Modification Tests', () {
test('should modify headers correctly', () async {
Copy link
Preview

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

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

[nitpick] Empty function body with no documentation. Consider adding a comment explaining why this mock function is intentionally empty or implement minimal tracking if needed for test validation.

Suggested change
test('should modify headers correctly', () async {
test('should modify headers correctly', () async {
// Mock function for environment update; intentionally left empty as no update logic is needed for this test.

Copilot uses AI. Check for mistakes.

animator and others added 8 commits September 27, 2025 16:22
Replaced print statements with debugPrint in tests for better Flutter logging practices. In js_runtime_notifier.dart, replaced print statements with structured logging via terminalStateProvider, providing more consistent and contextual log handling. Minor code style improvements were also made.
Corrects the navigation indices for Terminal (Logs) and Settings pages in both desktop and mobile dashboards and navbars, ensuring consistent navigation and page rendering.
@animator animator requested a review from Copilot September 28, 2025 10:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 44 out of 49 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

lib/providers/js_runtime_notifier.dart:1

  • Empty function body with misleading comment. Either implement the mock function with appropriate behavior for testing or add a comment explaining why it's intentionally empty.
import 'dart:convert';

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@animator animator left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@animator animator merged commit 9389585 into foss42:main Sep 28, 2025
@animator animator linked an issue Sep 28, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add in-app logging console in API Dash
2 participants