Skip to content

ADFA-5012: Rework build output options - #1626

Open
dara-abijo-adfa wants to merge 9 commits into
stagefrom
ADFA-5012-rework-build-output-options
Open

ADFA-5012: Rework build output options#1626
dara-abijo-adfa wants to merge 9 commits into
stagefrom
ADFA-5012-rework-build-output-options

Conversation

@dara-abijo-adfa

Copy link
Copy Markdown
Contributor
  • Remove the time between tasks
  • Remove parenthesis from the time deltas
  • Align the task texts vertically
  • Add new icon to turn line numbers, timestamps, and time deltas on/off

@dara-abijo-adfa dara-abijo-adfa self-assigned this Aug 4, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 673b01d5-99c0-4675-a5fb-a4ed681ec3ed

📥 Commits

Reviewing files that changed from the base of the PR and between 19ec79a and 444a136.

📒 Files selected for processing (6)
  • app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt
  • app/src/main/java/com/itsaky/androidide/handlers/EditorBuildEventListener.kt
  • app/src/main/java/com/itsaky/androidide/viewmodel/BuildOutputViewModel.kt
  • app/src/test/java/com/itsaky/androidide/viewmodel/BuildOutputFilterTest.kt
  • preferences/src/main/java/com/itsaky/androidide/preferences/internal/EditorPreferences.kt
  • resources/src/main/res/values/strings.xml
🚧 Files skipped from review as they are similar to previous changes (5)
  • resources/src/main/res/values/strings.xml
  • app/src/main/java/com/itsaky/androidide/handlers/EditorBuildEventListener.kt
  • app/src/main/java/com/itsaky/androidide/viewmodel/BuildOutputViewModel.kt
  • app/src/test/java/com/itsaky/androidide/viewmodel/BuildOutputFilterTest.kt
  • app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt

📝 Walkthrough
  • Removes task-to-task time and parentheses from time deltas.
  • Aligns build output text vertically.
  • Adds persistent view controls for line numbers, timestamps, and time deltas.
  • Adds a view-options popup with accessibility support.
  • Updates build-output filtering and formatting tests.
  • Risk: Build output prefix changes may affect consumers that parse output.
  • Risk: The popup and scrollable action layout require UI validation across screen sizes.

Walkthrough

Build output now supports timestamp and delta prefixes, configurable line numbers, timestamps, and deltas, and filtering against displayed text. A shared view-options interface connects BuildOutputFragment to EditorBottomSheet, with persisted preferences, supporting resources, and tests.

Changes

Build output formatting and filtering

Layer / File(s) Summary
Output formatting and filtering
app/src/main/java/com/itsaky/androidide/viewmodel/BuildOutputViewModel.kt
The view model formats timing prefixes, applies display toggles, and filters displayed text while preserving newline behavior.
Build output timing pipeline
app/src/main/java/com/itsaky/androidide/handlers/EditorBuildEventListener.kt
The listener resets build timers, formats nonblank output lines, preserves blank lines and trailing newlines, and routes output through appendBuildOutput.
View-options UI integration
app/src/main/java/com/itsaky/androidide/fragments/output/ViewOptionsOutputFragment.kt, app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt, app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt, app/src/main/java/com/itsaky/androidide/fragments/output/LogFilterBarController.kt, app/src/main/res/layout/layout_editor_bottom_sheet.xml
The output fragment exposes line-number, timestamp, and delta controls. The bottom sheet shows the action when supported. The layout places the action among scrollable output actions. Level chips receive their visibility state individually.
Formatting validation, persistence, and UI resources
app/src/test/java/com/itsaky/androidide/viewmodel/BuildOutputFilterTest.kt, preferences/src/main/java/com/itsaky/androidide/preferences/internal/EditorPreferences.kt, idetooltips/src/main/java/com/itsaky/androidide/idetooltips/TooltipTag.kt, resources/src/main/res/drawable/ic_tune.xml, resources/src/main/res/values/strings.xml
Preferences persist the three display settings. Tests cover prefix formatting, independent toggles, newline preservation, and filtering. Supporting tooltip, icon, label, and accessibility resources were added.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: jomen-adfa, itsaky-adfa, jatezzz, hal-eisen-adfa

Poem

A rabbit watched the build lines glow,
With timestamps in a steady flow.
Three toggles clicked, the view grew clear,
The options button hopped near.
Tests kept each newline bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: reworking build output options.
Description check ✅ Passed The description directly relates to the formatting changes and new controls implemented in the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ADFA-5012-rework-build-output-options

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt (1)

409-412: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Apply view options to live output.

renderFiltered passes both visibility states to filterLines. Line 411 uses the default true values instead. After a user hides timestamps or deltas, later output shows the hidden prefixes again. Filtering can also match hidden prefix text. Pass both view-model states here and add a regression test for output appended after each toggle.

Proposed fix
 val visibleText =
-	BuildOutputViewModel.filterLines(text, buildOutputViewModel.filterText.value)
+	BuildOutputViewModel.filterLines(
+		text,
+		buildOutputViewModel.filterText.value,
+		buildOutputViewModel.showTimestamps.value,
+		buildOutputViewModel.showDeltas.value,
+	)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt`
around lines 409 - 412, Update the live-output filtering call in
BuildOutputFragment to pass the current timestamp and delta visibility states
from buildOutputViewModel, matching the arguments used by renderFiltered instead
of relying on filterLines defaults. Ensure appended output preserves both toggle
settings and add regression coverage for output received after each visibility
toggle.
🧹 Nitpick comments (2)
app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt (1)

148-152: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document setLineNumbersEnabled.

Add KDoc for this public function. It changes both gutter visibility and divider width. The coding guideline requires KDoc for public functions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt`
around lines 148 - 152, Add KDoc to the public setLineNumbersEnabled function
describing that it enables or disables editor line numbers and updates the
gutter divider width accordingly, including the meaning of the enabled
parameter.

Source: Coding guidelines

resources/src/main/res/values/strings.xml (1)

701-703: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Run Spotless on this file.

Lines 701-703 use spaces for indentation. Use tabs and reformat the complete changed file with Spotless. The repository rule requires tabs and file-level formatting when the Spotless ratchet applies.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@resources/src/main/res/values/strings.xml` around lines 701 - 703, Reformat
the complete changed strings.xml file with Spotless, ensuring the entries
log_filter_line_numbers, log_filter_timestamps, and log_filter_deltas use tab
indentation rather than spaces and all other file-level formatting follows the
repository’s Spotless ratchet rules.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@app/src/main/java/com/itsaky/androidide/handlers/EditorBuildEventListener.kt`:
- Around line 45-46: Update the timing state used for stepDeltaMs in
EditorBuildEventListener to use SystemClock.elapsedRealtime() for
buildStartTimeMs and lastOutputTimeMs, and update all related assignments and
delta calculations, including the logic around lines 106-109 and 183-188. Keep
System.currentTimeMillis() exclusively for wall-clock timestamps.

---

Outside diff comments:
In
`@app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt`:
- Around line 409-412: Update the live-output filtering call in
BuildOutputFragment to pass the current timestamp and delta visibility states
from buildOutputViewModel, matching the arguments used by renderFiltered instead
of relying on filterLines defaults. Ensure appended output preserves both toggle
settings and add regression coverage for output received after each visibility
toggle.

---

Nitpick comments:
In
`@app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt`:
- Around line 148-152: Add KDoc to the public setLineNumbersEnabled function
describing that it enables or disables editor line numbers and updates the
gutter divider width accordingly, including the meaning of the enabled
parameter.

In `@resources/src/main/res/values/strings.xml`:
- Around line 701-703: Reformat the complete changed strings.xml file with
Spotless, ensuring the entries log_filter_line_numbers, log_filter_timestamps,
and log_filter_deltas use tab indentation rather than spaces and all other
file-level formatting follows the repository’s Spotless ratchet rules.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5bdba0b6-a321-434c-82b6-c3243f8e567e

📥 Commits

Reviewing files that changed from the base of the PR and between ba381bb and 19ec79a.

📒 Files selected for processing (11)
  • app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt
  • app/src/main/java/com/itsaky/androidide/fragments/output/LogFilterBarController.kt
  • app/src/main/java/com/itsaky/androidide/fragments/output/ViewOptionsOutputFragment.kt
  • app/src/main/java/com/itsaky/androidide/handlers/EditorBuildEventListener.kt
  • app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt
  • app/src/main/java/com/itsaky/androidide/viewmodel/BuildOutputViewModel.kt
  • app/src/main/res/layout/layout_editor_bottom_sheet.xml
  • app/src/test/java/com/itsaky/androidide/viewmodel/BuildOutputFilterTest.kt
  • idetooltips/src/main/java/com/itsaky/androidide/idetooltips/TooltipTag.kt
  • resources/src/main/res/drawable/ic_tune.xml
  • resources/src/main/res/values/strings.xml

Comment thread app/src/main/java/com/itsaky/androidide/handlers/EditorBuildEventListener.kt Outdated
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.

1 participant