Skip to content

Conversation

@kean
Copy link
Contributor

@kean kean commented Nov 21, 2025

Description

  • Integrate Pulse and set it up using SwiftLog Logging System
  • Add a "bolt" button to "Experimental Features". Tap it five times, and it'll show a new "Super Experimental Features" section.
  • Show "Extensive Logging" flag in the new section. When you enable it, it'll show a warning alert.
  • Add "Logger" section in "App Settings" (if enabled)

Screenshot 2025-11-21 at 4 05 01 PM Screenshot 2025-11-21 at 4 04 05 PM
Screenshot 2025-11-21 at 4 05 13 PM Screenshot 2025-11-21 at 4 07 36 PM

@kean kean added the General label Nov 21, 2025
@kean kean added this to the 26.5 milestone Nov 21, 2025
@kean kean requested a review from jkmassel November 21, 2025 21:09
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 21, 2025

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number30558
VersionPR #25005
Bundle IDorg.wordpress.alpha
Commit4a4a631
Installation URL4fi7b4rofcg48
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 21, 2025

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number30558
VersionPR #25005
Bundle IDcom.jetpack.alpha
Commit4a4a631
Installation URL1h4c1jlc6jotg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot wpmobilebot modified the milestones: 26.5, 26.6 Nov 23, 2025
@wpmobilebot
Copy link
Contributor

Version 26.5 has now entered code-freeze, so the milestone of this PR has been updated to 26.6.

@kean kean force-pushed the task/add-pulse-logger branch from 540bef8 to 942aeec Compare November 24, 2025 13:16
@kean
Copy link
Contributor Author

kean commented Nov 24, 2025

Renamed it to "Developer Tools"

.font(.system(size: 20))
.foregroundColor(.secondary)
.symbolEffect(.bounce.up, value: tapCount)
.onTapGesture {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does onTapGesture(count: 5) { isDeveloperModeEnabled = true } work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to change it and try it.
I generated all the original code.

@crazytonyli
Copy link
Contributor

If I understand correctly, with the changes in this PR, the app now always uses Pulse to log HTTP requests and responses, and the feature toggle controls whether the user can see those logs. Considering 99% of the users won't turn on the feature toggle and view the logs, to avoid running code and taking up the app's memory for nothing, should we change the model to only log HTTP requests when the feature toggle is on?

@kean
Copy link
Contributor Author

kean commented Nov 25, 2025

should we change the model to only log HTTP requests when the feature toggle is on?

There is a significant impact on performance and app on-disk see. If has to be a debug-only feature.

@crazytonyli
Copy link
Contributor

@kean @jkmassel I have made quite a few changes. Do you mind having another look?

@crazytonyli
Copy link
Contributor

The new cards look like this:

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 21, 2026

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

@dcalhoun
Copy link
Member

The new cards look like this:

I recognize the current layout mimics the Prompts card, but the mixture of left- and center-aligned text feels odd to me. Also, the majority of the Jetpack cards seem to only use left-aligned text.

I suggest we use a single alignment rather than mixing them. As an example, the iOS Settings app showcases both layouts.

Left-aligned Center-aligned
left-aligned center-aligned

@kean
Copy link
Contributor Author

kean commented Jan 21, 2026

I'm not sure you want to see the card on the most prime spot on the dashboard all the time you have logging enabled. It can be pretty annoying.

Claude recommends the following as an ideal option:

  • Set a reasonable TTL when enabling it, e.g. 24h, 7 days, or give user an option
  • When the time is up, show an interactive alert on app launch: "Extensive logging has been running for . Turn it off?" [Turn Logging Off] [Extend For 24 hours] [Extend for 7 days].

@crazytonyli
Copy link
Contributor

@dcalhoun Good call. I'll align the content to the left to see how it looks.


We shouldn't have an auto-timeout on it though – it'd be super annoying if it turned itself off right before an issue happened and we missed it.

@kean I agree with Jeremy's comment here ⬆️. I imagine users would only keep the extensive logging flag on for a short amount of time when they try to reproduce an issue. Maybe we can add an "Ignore" button to the card, which dismisses the card while keeping the extensive logging flag on? I think we should still warn users about it, though. We can make the "ignore" action take effect for a week or so, so users can still see the warning if they keep the flag on.

@kean
Copy link
Contributor Author

kean commented Jan 21, 2026

Jeremy's concern was that it would turn itself off automatically, which is fair. With an alert, however, it won't. It will simply ask if you still need it.

@kean
Copy link
Contributor Author

kean commented Jan 21, 2026

A persistent indicator also seems a OK, but I'd suggest showing it as a small badge with an info button instead of a large card. It only needs to say "Extensive Logging On".

@crazytonyli
Copy link
Contributor

@kean Maybe something like this?

Simulator.Screen.Recording.-.iPhone.17.-.2026-01-22.at.11.45.22.mov

@kean
Copy link
Contributor Author

kean commented Jan 22, 2026

Here's another potential option, which I liked the most out of the ones I tried.

Screenshot 2026-01-21 at 9 58 31 PM
  • Orange to indicate that this is "not normal"
  • Info icon to show that it's tappable

It should work well if the goal is to ensure you turn it off as soon as possible. I think we should let you hide it though like other cards. Look for how personalization service it used. It has the storage and the APIs for that.

struct CompactLoggingBadge: View {
    var body: some View {
        HStack(spacing: 12) {
            Circle()
                .fill(.orange)
                .frame(width: 8, height: 8)

            VStack(alignment: .leading) {
                Text("Extensive Logging Enabled")
                    .font(.subheadline)
                    .fontWeight(.medium)
                Text("This feature may impact performance")
                    .font(.caption)
                    .foregroundStyle(.secondary)
            }

            Spacer()

            Image(systemName: "info.circle.fill")
                .foregroundStyle(.tertiary)
        }
        .padding(.vertical, 4)
    }
}

I'd show it under "Prompts" card so it doesn't draw as much attention, but is still visible.

@crazytonyli
Copy link
Contributor

@kean Thanks for the suggestion! I have taken your code, with a small adjustment to the spacings to match the dashboard UI.

@sonarqubecloud
Copy link

@crazytonyli crazytonyli added this pull request to the merge queue Jan 22, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 22, 2026
@crazytonyli crazytonyli added this pull request to the merge queue Jan 22, 2026
Merged via the queue into trunk with commit 934cd80 Jan 22, 2026
29 of 35 checks passed
@crazytonyli crazytonyli deleted the task/add-pulse-logger branch January 22, 2026 22:31
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.

7 participants