Skip to content

armgit / cra

Public Imported from GitHub
0

The open-source Arc replacement for macOS. Spaces, pinned tabs, split view, Little Windows and Arc's shortcuts on Chromium, with your Arc sidebar imported in one go.

A loading bar at the top middle of the window, like Arc (#130)

Kevin McKelvin16cb16cff2fe
diff --git a/Packages/CraCore/Sources/CraCore/LoadingIndicator.swift b/Packages/CraCore/Sources/CraCore/LoadingIndicator.swift
new file mode 100644
index 0000000..d8a5680
--- /dev/null
+++ b/Packages/CraCore/Sources/CraCore/LoadingIndicator.swift
@@ -0,0 +1,62 @@
+/// Arc's loading indicator, a bar at the top middle of the window chrome, in the margin above the
+/// page card. Measured from a screen recording of Arc 1.171, 2 Nov 2026 (60 fps, 1.4 px per pt):
+/// - Waiting: the request is out and no response has committed. A 48 pt pill fades in over 0.7 s,
+/// out over 0.65 s and stays off for 0.25 s, at 75 % white.
+/// - Loading: the page committed. The pill widens to a 130 pt track at 18 % white, and a 76 %
+/// white segment sweeps it every 1.12 s: its head runs left to right in 0.37 s, then its tail
+/// does, then the track stays empty for the rest of the cycle. Both edges move at a steady speed.
+/// - Done: the whole track lights up, then it shrinks toward the middle and fades in 0.3 s.
+/// The bar is 4 pt tall, centred in the top margin.
+public enum LoadingIndicator {
+ public enum Phase: Equatable, Sendable {
+ case hidden
+ case waiting
+ case loading
+
+ /// `committed`: the main frame's current navigation has a response (CEF's OnLoadStart).
+ public init(isLoading: Bool, committed: Bool) {
+ self = !isLoading ? .hidden : committed ? .loading : .waiting
+ }
+ }
+
+ public static let pillWidth: Double = 48
+ public static let trackWidth: Double = 130
+ public static let height: Double = 4
+
+ public static let brightAlpha: Double = 0.76
+ public static let trackAlpha: Double = 0.18
+
+ public static let pulsePeriod: Double = 1.6
+ /// Opacity of the waiting pill through one pulse: time (0...1 of `pulsePeriod`) and value.
+ public static let pulseKeyframes: [(time: Double, opacity: Double)] = [
+ (0, 0), (0.7 / 1.6, 1), (1.35 / 1.6, 0), (1, 0),
+ ]
+
+ public static let sweepPeriod: Double = 1.12
+ /// Where the segment's head has finished and its tail starts, as a fraction of the cycle. A
+ /// waiting pill that widens into the track joins the cycle here: lit end to end.
+ public static let sweepTailStart: Double = 0.37 / 1.12
+ /// The segment through one sweep: time (0...1 of `sweepPeriod`) and its two ends (0...1 of
+ /// the track). Between keyframes both ends move linearly.
+ public static let sweepKeyframes: [(time: Double, start: Double, end: Double)] = [
+ (0, 0, 0), (sweepTailStart, 0, 1), (0.74 / 1.12, 1, 1), (1, 1, 1),
+ ]
+
+ /// The segment's ends at `time` seconds into a sweep.
+ public static func sweep(at time: Double) -> (start: Double, end: Double) {
+ let t = (time / sweepPeriod).truncatingRemainder(dividingBy: 1)
+ let k = sweepKeyframes
+ for i in 1..<k.count where t <= k[i].time {
+ let f = (t - k[i - 1].time) / (k[i].time - k[i - 1].time)
+ return (k[i - 1].start + (k[i].start - k[i - 1].start) * f, k[i - 1].end + (k[i].end - k[i - 1].end) * f)
+ }
+ return (1, 1)
+ }
+
+ /// The time the waiting pill takes to widen into the track.
+ public static let expandDuration: Double = 0.35
+ /// The time the finished track takes to shrink and fade.
+ public static let finishDuration: Double = 0.3
+ /// The width the finished track shrinks to as it fades.
+ public static let finishWidth: Double = 75
+}
diff --git a/Packages/CraCore/Tests/CraCoreTests/LoadingIndicatorTests.swift b/Packages/CraCore/Tests/CraCoreTests/LoadingIndicatorTests.swift
new file mode 100644
index 0000000..ecb8d20
--- /dev/null
+++ b/Packages/CraCore/Tests/CraCoreTests/LoadingIndicatorTests.swift
@@ -0,0 +1,37 @@
+import CraCore
+import Testing
+
+/// Arc's loading bar (Arc 1.171 screen recording, 2 Nov 2026).
+struct LoadingIndicatorTests {
+ func ends(at time: Double) -> [Double] {
+ let s = LoadingIndicator.sweep(at: time)
+ return [s.start, s.end].map { ($0 * 100).rounded() / 100 }
+ }
+
+ @Test func phaseFollowsLoadingAndCommit() {
+ #expect(LoadingIndicator.Phase(isLoading: false, committed: false) == .hidden)
+ #expect(LoadingIndicator.Phase(isLoading: false, committed: true) == .hidden)
+ #expect(LoadingIndicator.Phase(isLoading: true, committed: false) == .waiting)
+ #expect(LoadingIndicator.Phase(isLoading: true, committed: true) == .loading)
+ }
+
+ @Test func headSweepsThenTailThenGap() {
+ #expect(ends(at: 0) == [0, 0])
+ #expect(ends(at: 0.185) == [0, 0.5])
+ #expect(ends(at: 0.37) == [0, 1])
+ #expect(ends(at: 0.555) == [0.5, 1])
+ #expect(ends(at: 0.9) == [1, 1])
+ // The cycle repeats.
+ #expect(ends(at: LoadingIndicator.sweepPeriod + 0.185) == [0, 0.5])
+ }
+
+ @Test func keyframesRunInOrderOverOneCycle() {
+ for times in [LoadingIndicator.sweepKeyframes.map(\.time), LoadingIndicator.pulseKeyframes.map(\.time)] {
+ #expect(times.first == 0)
+ #expect(times.last == 1)
+ #expect(times == times.sorted())
+ }
+ // A widening pill joins the sweep lit end to end.
+ #expect(ends(at: LoadingIndicator.sweepTailStart * LoadingIndicator.sweepPeriod) == [0, 1])
+ }
+}
diff --git a/Sources/Cra/Services/BrowserManager.swift b/Sources/Cra/Services/BrowserManager.swift
index 0c6e624..2a987b8 100644
--- a/Sources/Cra/Services/BrowserManager.swift
+++ b/Sources/Cra/Services/BrowserManager.swift
@@ -766,6 +766,12 @@ final class BrowserManager: NSObject, @preconcurrency CraBrowserDelegate {
delegate?.browserManagerDidUpdate(id)
}
+ /// The window's loading bar pulses until the page commits, then sweeps (LoadingIndicator).
+ func browser(_ browser: CraBrowser, didChangeCommittedLoad committed: Bool) {
+ guard let id = tabID(of: browser) else { return }
+ delegate?.browserManagerDidUpdate(id)
+ }
+
func browser(_ browser: CraBrowser, didChangeProgress progress: Double) {
guard let id = tabID(of: browser) else { return }
runtimes[id]?.progress = progress
diff --git a/Sources/Cra/UI/LoadingIndicatorView.swift b/Sources/Cra/UI/LoadingIndicatorView.swift
new file mode 100644
index 0000000..d653a0c
--- /dev/null
+++ b/Sources/Cra/UI/LoadingIndicatorView.swift
@@ -0,0 +1,185 @@
+import AppKit
+
+/// Arc's loading bar at the top middle of the window chrome (LoadingIndicator has Arc's
+/// numbers): a pill that pulses while the server hasn't answered, widening into a track that a
+/// segment sweeps until the page has loaded, then a flash that shrinks away. Like Arc, it moves
+/// whatever Reduce Motion says. The mouse goes through it to the window behind.
+final class LoadingIndicatorView: NSView {
+ private let track = CALayer()
+ private let segment = CALayer()
+ private(set) var phase: LoadingIndicator.Phase = .hidden
+ var isDark = true { didSet { if isDark != oldValue { applyColors() } } }
+ /// The track's width; the pill's while waiting.
+ private var width = CGFloat(LoadingIndicator.pillWidth)
+ /// The whole track lit (the pill, the widening, the flash) rather than dim under the segment.
+ private var lit = true
+ /// Bumped on each phase change, so a step scheduled for an earlier phase does nothing.
+ private var generation = 0
+
+ private static let height = CGFloat(LoadingIndicator.height)
+ private static let trackWidth = CGFloat(LoadingIndicator.trackWidth)
+
+ override init(frame: NSRect) {
+ super.init(frame: frame)
+ wantsLayer = true
+ track.cornerRadius = Self.height / 2
+ track.cornerCurve = .continuous
+ track.masksToBounds = true
+ track.opacity = 0
+ segment.anchorPoint = CGPoint(x: 0, y: 0.5)
+ segment.isHidden = true
+ track.addSublayer(segment)
+ layer?.addSublayer(track)
+ applyColors()
+ }
+
+ required init?(coder: NSCoder) { fatalError() }
+
+ override func hitTest(_ point: NSPoint) -> NSView? { nil }
+
+ override func layout() {
+ super.layout()
+ CATransaction.begin(); CATransaction.setDisableActions(true)
+ track.position = CGPoint(x: bounds.midX, y: bounds.midY)
+ track.bounds.size = CGSize(width: width, height: Self.height)
+ segment.position.y = Self.height / 2
+ segment.bounds.size.height = Self.height
+ CATransaction.commit()
+ }
+
+ /// `animated` NO (another tab came to the front, or a new tab's first load) skips the
+ /// widening, the fade-in and the flash; the pulse and the sweep run either way.
+ func setPhase(_ new: LoadingIndicator.Phase, animated: Bool) {
+ guard new != phase else { return }
+ let old = phase
+ phase = new
+ generation &+= 1
+ CATransaction.begin(); CATransaction.setDisableActions(true)
+ defer { CATransaction.commit() }
+ switch new {
+ case .hidden: animated ? finish(from: old) : stop()
+ case .waiting: pulse()
+ case .loading:
+ if old == .waiting, animated { expand() } else { sweep(from: 0, fadeIn: animated && old == .hidden) }
+ }
+ }
+
+ private func stop() {
+ track.removeAllAnimations()
+ segment.removeAllAnimations()
+ segment.isHidden = true
+ track.opacity = 0
+ }
+
+ private func setWidth(_ w: CGFloat) {
+ width = w
+ track.bounds.size.width = w
+ }
+
+ private func pulse() {
+ stop()
+ setWidth(CGFloat(LoadingIndicator.pillWidth))
+ setLit(true)
+ let a = CAKeyframeAnimation(keyPath: "opacity")
+ let k = LoadingIndicator.pulseKeyframes
+ a.values = k.map { Float($0.opacity) }
+ a.keyTimes = k.map { NSNumber(value: $0.time) }
+ a.timingFunctions = Array(repeating: CAMediaTimingFunction(name: .easeInEaseOut), count: k.count - 1)
+ a.duration = LoadingIndicator.pulsePeriod
+ a.repeatCount = .infinity
+ track.add(a, forKey: "pulse")
+ }
+
+ /// The pulsing pill widens into the track, lit, and the sweep picks up as its tail sets off.
+ private func expand() {
+ let opacity = track.presentation()?.opacity ?? track.opacity
+ track.removeAllAnimations()
+ track.opacity = 1
+ let from = width
+ setWidth(Self.trackWidth)
+ let grow = CABasicAnimation(keyPath: "bounds.size.width")
+ grow.fromValue = from
+ grow.toValue = Self.trackWidth
+ grow.duration = LoadingIndicator.expandDuration
+ grow.timingFunction = CAMediaTimingFunction(name: .easeOut)
+ track.add(grow, forKey: "grow")
+ let fade = CABasicAnimation(keyPath: "opacity")
+ fade.fromValue = opacity
+ fade.toValue = 1
+ fade.duration = 0.15
+ track.add(fade, forKey: "fade")
+ let g = generation
+ DispatchQueue.main.asyncAfter(deadline: .now() + LoadingIndicator.expandDuration) { [weak self] in
+ guard let self, self.generation == g else { return }
+ CATransaction.begin(); CATransaction.setDisableActions(true)
+ self.sweep(from: LoadingIndicator.sweepTailStart, fadeIn: false)
+ CATransaction.commit()
+ }
+ }
+
+ /// `start`: where in the cycle (0...1) the sweep begins.
+ private func sweep(from start: Double, fadeIn: Bool) {
+ stop()
+ setWidth(Self.trackWidth)
+ track.opacity = 1
+ setLit(false)
+ segment.isHidden = false
+ segment.position.x = 0
+ segment.bounds.size.width = 0
+ let w = Double(Self.trackWidth)
+ let k = LoadingIndicator.sweepKeyframes
+ for (key, values) in [("position.x", k.map { $0.start * w }), ("bounds.size.width", k.map { ($0.end - $0.start) * w })] {
+ let a = CAKeyframeAnimation(keyPath: key)
+ a.values = values
+ a.keyTimes = k.map { NSNumber(value: $0.time) }
+ a.calculationMode = .linear
+ a.duration = LoadingIndicator.sweepPeriod
+ a.timeOffset = start * LoadingIndicator.sweepPeriod
+ a.repeatCount = .infinity
+ segment.add(a, forKey: key)
+ }
+ if fadeIn {
+ let fade = CABasicAnimation(keyPath: "opacity")
+ fade.fromValue = 0
+ fade.toValue = 1
+ fade.duration = 0.15
+ track.add(fade, forKey: "fade")
+ }
+ }
+
+ /// Loaded: the whole track lights up and shrinks toward its middle as it fades. A pill that
+ /// never got an answer (stopped, failed, a same-page navigation) just fades.
+ private func finish(from old: LoadingIndicator.Phase) {
+ let opacity = track.presentation()?.opacity ?? track.opacity
+ let from = track.presentation()?.bounds.size.width ?? width
+ stop()
+ setLit(true)
+ let fade = CABasicAnimation(keyPath: "opacity")
+ fade.fromValue = old == .waiting ? opacity : 1
+ fade.toValue = 0
+ fade.duration = old == .waiting ? 0.2 : LoadingIndicator.finishDuration
+ fade.timingFunction = CAMediaTimingFunction(name: .easeIn)
+ track.add(fade, forKey: "fade")
+ guard old == .loading else { return }
+ setWidth(CGFloat(LoadingIndicator.finishWidth))
+ let shrink = CABasicAnimation(keyPath: "bounds.size.width")
+ shrink.fromValue = from
+ shrink.toValue = LoadingIndicator.finishWidth
+ shrink.duration = LoadingIndicator.finishDuration
+ shrink.timingFunction = CAMediaTimingFunction(name: .easeIn)
+ track.add(shrink, forKey: "shrink")
+ }
+
+ private func setLit(_ on: Bool) {
+ lit = on
+ applyColors()
+ }
+
+ private func applyColors() {
+ let ink = isDark ? NSColor.white : NSColor.black
+ CATransaction.begin(); CATransaction.setDisableActions(true)
+ track.backgroundColor = ink.withAlphaComponent(lit ? LoadingIndicator.brightAlpha : LoadingIndicator.trackAlpha).cgColor
+ segment.backgroundColor = ink.withAlphaComponent(LoadingIndicator.brightAlpha).cgColor
+ CATransaction.commit()
+ }
+}
diff --git a/Sources/Cra/UI/ShellView.swift b/Sources/Cra/UI/ShellView.swift
index 9791ce8..27ec906 100644
--- a/Sources/Cra/UI/ShellView.swift
+++ b/Sources/Cra/UI/ShellView.swift
@@ -71,6 +71,9 @@ final class ShellView: NSView {
private var animatingPanes = false
/// Arc's faint card over the gradient while no tab is selected.
let placeholderHost = NSView()
+ /// Arc's loading bar in the margin above the card, for the front tab.
+ let loadingIndicator = LoadingIndicatorView()
+ private var loadingTabID: UUID?
let statusHost: NSView
let findHost: NSView
@@ -83,7 +86,12 @@ final class ShellView: NSView {
private(set) var focusedPaneID: UUID?
/// Panes without a page (Arc's tinted "Search or Enter URL…" pane).
private(set) var emptyPaneIDs: Set<UUID> = []
- var isDarkTheme = false { didSet { for c in paneCards { c.isDark = isDarkTheme } } }
+ var isDarkTheme = false {
+ didSet {
+ for c in paneCards { c.isDark = isDarkTheme }
+ loadingIndicator.isDark = isDarkTheme
+ }
+ }
/// Each tab's page background ("#RRGGBB"), painted under its page window (PaneCardView.pageColor).
var pageColors: [UUID: String] = [:] {
didSet { for c in paneCards where c.pageColor != pageColors[c.tabID] { c.pageColor = pageColors[c.tabID] } }
@@ -228,6 +236,7 @@ final class ShellView: NSView {
contentContainer.wantsLayer = true
contentContainer.layer?.backgroundColor = NSColor.clear.cgColor
addSubview(contentContainer)
+ addSubview(loadingIndicator)
parkingView.isHidden = true
parkingView.autoresizesSubviews = false
contentContainer.addSubview(parkingView)
@@ -548,6 +557,7 @@ final class ShellView: NSView {
resizeHandle.frame = f.handle
resizeHandle.isHidden = f.handle.isEmpty || !sidebarResizable
contentContainer.frame = f.content
+ placeLoadingIndicator(over: f.content)
cardCornerRadius = f.cornerRadius
sidebarHost.layer?.cornerRadius = f.sidebarCorner
if f.sidebarCorner > 0 {
@@ -561,6 +571,26 @@ final class ShellView: NSView {
layoutContentChildren()
}
+ /// Centred over the card, in the margin above it; hidden where there is none (edge to
+ /// edge, fullscreen).
+ private func placeLoadingIndicator(over content: NSRect) {
+ let margin = bounds.maxY - content.maxY
+ loadingIndicator.isHidden = margin < CGFloat(LoadingIndicator.height) + 2
+ loadingIndicator.frame = loadingIndicatorFrame(over: content)
+ }
+
+ private func loadingIndicatorFrame(over content: NSRect) -> NSRect {
+ let w = CGFloat(LoadingIndicator.trackWidth) + 2
+ return NSRect(x: (content.midX - w / 2).rounded(), y: content.maxY, width: w, height: bounds.maxY - content.maxY)
+ }
+
+ /// The front tab's loading state. Another tab coming to the front shows its state at once.
+ func setLoading(_ phase: LoadingIndicator.Phase, tab: UUID?) {
+ let sameTab = tab == loadingTabID
+ loadingTabID = tab
+ loadingIndicator.setPhase(phase, animated: sameTab)
+ }
+
func layoutContentChildren(animated: Bool = false) {
let cb = contentContainer.bounds
let toolbarVisible = showToolbar && !contentFullscreen
@@ -688,6 +718,7 @@ final class ShellView: NSView {
ctx.allowsImplicitAnimation = true
if !sidebarDetached { sidebarHost.animator().frame = target.sidebar }
contentContainer.animator().frame = target.content
+ loadingIndicator.animator().frame = loadingIndicatorFrame(over: target.content)
cardCornerRadius = target.cornerRadius
if paneCards.count == 1, let c = paneCards.first { c.cornerRadius = target.cornerRadius }
} completionHandler: { [weak self] in
diff --git a/Sources/Cra/UI/Windows/MainWindowController.swift b/Sources/Cra/UI/Windows/MainWindowController.swift
index f3c4660..8bf1d52 100644
--- a/Sources/Cra/UI/Windows/MainWindowController.swift
+++ b/Sources/Cra/UI/Windows/MainWindowController.swift
@@ -431,6 +431,8 @@ final class MainWindowController: NSWindowController, NSWindowDelegate, BrowserM
if sidebarUI.canGoBack != (b?.canGoBack ?? false) { sidebarUI.canGoBack = b?.canGoBack ?? false }
if sidebarUI.canGoForward != (b?.canGoForward ?? false) { sidebarUI.canGoForward = b?.canGoForward ?? false }
if sidebarUI.isLoading != (b?.isLoading ?? false) { sidebarUI.isLoading = b?.isLoading ?? false }
+ shell.setLoading(LoadingIndicator.Phase(isLoading: b?.isLoading ?? false, committed: b?.hasCommittedLoad ?? false),
+ tab: browsers.visibleTabID)
let themeColor = browsers.visibleRuntime?.themeColor ?? ""
if sidebarUI.pageThemeColor != themeColor { sidebarUI.pageThemeColor = themeColor }
for (id, rt) in browsers.runtimes where sidebarUI.progress[id] != rt.progress { sidebarUI.progress[id] = rt.progress }
diff --git a/Sources/CraCEF/CraCEF.mm b/Sources/CraCEF/CraCEF.mm
index 972a4b2..c181b4b 100644
--- a/Sources/CraCEF/CraCEF.mm
+++ b/Sources/CraCEF/CraCEF.mm
@@ -172,6 +172,7 @@ static CraClient* AsCraClient(CefClient* c) {
@property (nonatomic, copy) NSString* currentURL;
@property (nonatomic, copy) NSString* currentTitle;
@property (nonatomic) BOOL isLoading;
+@property (nonatomic) BOOL hasCommittedLoad;
@property (nonatomic) BOOL canGoBack;
@property (nonatomic) BOOL canGoForward;
@property (nonatomic) BOOL isCreated;
@@ -1161,6 +1162,7 @@ public:
bool canGoForward) override {
CraBrowser* o = owner_;
if (!o) return;
+ if (isLoading && !o.isLoading) o.hasCommittedLoad = NO;
o.isLoading = isLoading;
o.canGoBack = canGoBack;
o.canGoForward = canGoForward;
@@ -1177,6 +1179,14 @@ public:
if ([o.delegate respondsToSelector:@selector(browser:didReportBackgroundColor:)])
[o.delegate browser:o didReportBackgroundColor:@""];
frame->ExecuteJavaScript(kLoadingBackgroundProbe, frame->GetURL(), 0);
+ SetCommittedLoad(o, YES);
+ }
+
+ void SetCommittedLoad(CraBrowser* o, BOOL committed) {
+ if (o.hasCommittedLoad == committed) return;
+ o.hasCommittedLoad = committed;
+ if ([o.delegate respondsToSelector:@selector(browser:didChangeCommittedLoad:)])
+ [o.delegate browser:o didChangeCommittedLoad:committed];
}
void OnLoadEnd(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, int httpStatusCode) override {
@@ -1394,7 +1404,16 @@ public:
bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
bool user_gesture, bool is_redirect) override {
CraBrowser* o = owner_;
- if (!o || !user_gesture || is_redirect || !frame->IsMain()) return false;
+ if (!o || !frame->IsMain()) return false;
+ if (OpensPeek(o, request, user_gesture, is_redirect)) return true;
+ // A new page, also one started while the last is still loading: the loading bar waits
+ // for its answer again.
+ if (!is_redirect) SetCommittedLoad(o, NO);
+ return false;
+ }
+
+ bool OpensPeek(CraBrowser* o, CefRefPtr<CefRequest> request, bool user_gesture, bool is_redirect) {
+ if (!user_gesture || is_redirect) return false;
cef_transition_type_t tt = request->GetTransitionType();
if ((tt & TT_SOURCE_MASK) != TT_LINK || (tt & TT_FORWARD_BACK_FLAG)) return false;
if (![o.delegate respondsToSelector:@selector(browser:opensPeekForURL:shiftClick:)]) return false;
diff --git a/Sources/CraCEF/include/CraCEF.h b/Sources/CraCEF/include/CraCEF.h
index 84f3b92..2093259 100644
--- a/Sources/CraCEF/include/CraCEF.h
+++ b/Sources/CraCEF/include/CraCEF.h
@@ -96,6 +96,8 @@ typedef NS_ENUM(NSInteger, CraDownloadState) {
- (void)browser:(CraBrowser *)browser didChangeMediaCapture:(BOOL)capturing;
/// The page started or stopped playing sound (see `isAudible`).
- (void)browser:(CraBrowser *)browser didChangeAudible:(BOOL)audible;
+/// `hasCommittedLoad` changed: the main frame committed, or a new navigation started.
+- (void)browser:(CraBrowser *)browser didChangeCommittedLoad:(BOOL)committed;
/// The page's main-frame load failed with a net error (ERR_ABORTED, a navigation cut off,
/// is left out): `url` is the address that failed.
- (void)browser:(CraBrowser *)browser didFailLoadingURL:(NSString *)url errorCode:(NSInteger)errorCode;
@@ -121,6 +123,9 @@ typedef NS_ENUM(NSInteger, CraDownloadState) {
@property (nonatomic, readonly, copy) NSString *currentURL;
@property (nonatomic, readonly, copy) NSString *currentTitle;
@property (nonatomic, readonly) BOOL isLoading;
+/// NO from the start of a main-frame navigation until it commits (the server answered and the
+/// new page began to load), YES after.
+@property (nonatomic, readonly) BOOL hasCommittedLoad;
@property (nonatomic, readonly) BOOL canGoBack;
@property (nonatomic, readonly) BOOL canGoForward;
@property (nonatomic, readonly) BOOL isCreated;
diff --git a/docs/arc-reverse-engineering.md b/docs/arc-reverse-engineering.md
index 0950e6f..8e94a39 100644
--- a/docs/arc-reverse-engineering.md
+++ b/docs/arc-reverse-engineering.md
@@ -2382,3 +2382,22 @@ doesn't pick a tab, and the selection saved in StorableWindows.json wasn't alway
- Cra: CloseSuccessor (CraCore) with SidebarStore's per-window `previousTab` (not saved; set in `updateWindow`
whenever what the window shows changes) and `hasPage` (a window's browser manager has the page). A tab put to sleep has no page, like Arc's unloaded tabs.
`activeTabBeforeCreationID` is still saved and imported but no longer picks the next tab.
+
+## The loading bar above the card (Arc 1.171, 2 Nov 2026, PR #130, Kevin McKelvin's 60 fps recordings)
+Measured frame by frame by Kevin McKelvin from screen recordings of Arc (1.4 px per pt), against a local server
+that waits 3 s before answering and then serves a page whose image takes 5 s.
+- [O] A 4 pt bar, centred over the card in the margin above it.
+- [O] Waiting (the request is out, nothing committed): a 48 pt pill at 75 % white fades in over 0.7 s, out over
+ 0.65 s and stays off for 0.25 s (a 1.6 s cycle).
+- [O] Loading (the main frame committed): the pill widens to a 130 pt track at 18 % white in about 0.35 s. A 76 %
+ white segment sweeps it every 1.12 s: its head runs left to right in 0.37 s, then its tail, then the track
+ stays empty for the rest of the cycle. Both edges move at a steady speed.
+- [O] Done: the whole track lights up, then shrinks toward the middle (to about 75 pt) and fades in 0.3 s.
+- [O] It moves whatever Reduce Motion says.
+- [?] Not measured: a navigation started while the last page is still loading. Cra goes back to the waiting pill
+ until the new page commits, as Chromium treats it as a new navigation.
+- Cra: LoadingIndicator (CraCore) has the numbers and the phase rule. CraBrowser.hasCommittedLoad is NO from each
+ main-frame navigation (OnBeforeBrowse, not redirects) until OnLoadStart. LoadingIndicatorView draws it with Core
+ Animation; a tab coming to the front shows its own state at once, without the widening or the finish. With no
+ margin (edge to edge, fullscreen) there is no bar; on light themes it is black at the same opacities. It slides
+ with the card when the sidebar hides or shows.