detached 8e234aa

chore(deps): integrate cef2gtk presentation synchronization

commit
8e234aa0672cf5b4d0f5f6cda42a89e26d8e3459
author
brice · · 2026-07-14 08:45 UTC
committer
brice · · 2026-07-14 09:35 UTC
parent
0d8c582
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
7 files · +134 -19
M go.mod +1 -1
@@ -7,7 +7,7 @@ require (
77 github.com/andybalholm/brotli v1.2.2
88 github.com/bnema/purego v0.11.0-bnema.4
99 github.com/bnema/purego-cef v0.13.3
10- github.com/bnema/purego-cef2gtk v0.8.3
10+ github.com/bnema/purego-cef2gtk v0.8.4-0.20260714083412-f217ece342de
1111 github.com/bnema/purego-pipewire v0.1.4
1212 github.com/bnema/purego-sqlite v0.1.3
1313 github.com/bnema/puregotk v0.7.0
@@ -7,7 +7,7 @@ require (
7 github.com/andybalholm/brotli v1.2.27 github.com/andybalholm/brotli v1.2.2
8 github.com/bnema/purego v0.11.0-bnema.48 github.com/bnema/purego v0.11.0-bnema.4
9 github.com/bnema/purego-cef v0.13.39 github.com/bnema/purego-cef v0.13.3
10- github.com/bnema/purego-cef2gtk v0.8.310+ github.com/bnema/purego-cef2gtk v0.8.4-0.20260714083412-f217ece342de
11 github.com/bnema/purego-pipewire v0.1.411 github.com/bnema/purego-pipewire v0.1.4
12 github.com/bnema/purego-sqlite v0.1.312 github.com/bnema/purego-sqlite v0.1.3
13 github.com/bnema/puregotk v0.7.013 github.com/bnema/puregotk v0.7.0
M go.sum +2 -0 generated file: collapsed
M internal/logging/startup_trace.go +5 -1
@@ -151,9 +151,13 @@ func (st *StartupTrace) mark(name string) bool {
151151
152152 now := st.now()
153153 milestone := Milestone{Name: name, Elapsed: now.Sub(st.t0)}
154+ // Published fields are integer milliseconds. Compute delta on that same
155+ // scale so delta_ms always exactly reconstructs t_ms in collected evidence.
156+ previousMilliseconds := int64(0)
154157 if len(st.milestones) > 0 {
155- milestone.Delta = milestone.Elapsed - st.milestones[len(st.milestones)-1].Elapsed
158+ previousMilliseconds = st.milestones[len(st.milestones)-1].Elapsed.Milliseconds()
156159 }
160+ milestone.Delta = time.Duration(milestone.Elapsed.Milliseconds()-previousMilliseconds) * time.Millisecond
157161 st.milestones = append(st.milestones, milestone)
158162 if st.logger == nil {
159163 st.buffered = append(st.buffered, milestone)
@@ -151,9 +151,13 @@ func (st *StartupTrace) mark(name string) bool {
151 151
152 now := st.now()152 now := st.now()
153 milestone := Milestone{Name: name, Elapsed: now.Sub(st.t0)}153 milestone := Milestone{Name: name, Elapsed: now.Sub(st.t0)}
154+ // Published fields are integer milliseconds. Compute delta on that same
155+ // scale so delta_ms always exactly reconstructs t_ms in collected evidence.
156+ previousMilliseconds := int64(0)
154 if len(st.milestones) > 0 {157 if len(st.milestones) > 0 {
155- milestone.Delta = milestone.Elapsed - st.milestones[len(st.milestones)-1].Elapsed158+ previousMilliseconds = st.milestones[len(st.milestones)-1].Elapsed.Milliseconds()
156 }159 }
160+ milestone.Delta = time.Duration(milestone.Elapsed.Milliseconds()-previousMilliseconds) * time.Millisecond
157 st.milestones = append(st.milestones, milestone)161 st.milestones = append(st.milestones, milestone)
158 if st.logger == nil {162 if st.logger == nil {
159 st.buffered = append(st.buffered, milestone)163 st.buffered = append(st.buffered, milestone)
M internal/logging/startup_trace_test.go +15 -0
@@ -36,6 +36,21 @@ func TestStartupTraceAcceptsOnlyOrderedOneShotMilestones(t *testing.T) {
3636 require.False(t, trace.Mark("first_gtk_presentation"))
3737 }
3838
39+func TestStartupTraceQuantizesDeltaToPublishedMilliseconds(t *testing.T) {
40+ now := time.Unix(100, 0)
41+ trace := newStartupTrace(func() time.Time { return now })
42+
43+ now = now.Add(1500 * time.Microsecond)
44+ require.True(t, trace.Mark("process_entry"))
45+ now = now.Add(900 * time.Microsecond)
46+ require.True(t, trace.Mark("config_complete"))
47+
48+ require.Equal(t, int64(1), trace.milestones[0].Elapsed.Milliseconds())
49+ require.Equal(t, int64(1), trace.milestones[0].Delta.Milliseconds())
50+ require.Equal(t, int64(2), trace.milestones[1].Elapsed.Milliseconds())
51+ require.Equal(t, int64(1), trace.milestones[1].Delta.Milliseconds())
52+}
53+
3954 func TestStartupTraceFinishCannotFabricateFirstGTKPresentation(t *testing.T) {
4055 now := time.Unix(100, 0)
4156 trace := newStartupTrace(func() time.Time { return now })
@@ -36,6 +36,21 @@ func TestStartupTraceAcceptsOnlyOrderedOneShotMilestones(t *testing.T) {
36 require.False(t, trace.Mark("first_gtk_presentation"))36 require.False(t, trace.Mark("first_gtk_presentation"))
37 }37 }
38 38
39+func TestStartupTraceQuantizesDeltaToPublishedMilliseconds(t *testing.T) {
40+ now := time.Unix(100, 0)
41+ trace := newStartupTrace(func() time.Time { return now })
42+
43+ now = now.Add(1500 * time.Microsecond)
44+ require.True(t, trace.Mark("process_entry"))
45+ now = now.Add(900 * time.Microsecond)
46+ require.True(t, trace.Mark("config_complete"))
47+
48+ require.Equal(t, int64(1), trace.milestones[0].Elapsed.Milliseconds())
49+ require.Equal(t, int64(1), trace.milestones[0].Delta.Milliseconds())
50+ require.Equal(t, int64(2), trace.milestones[1].Elapsed.Milliseconds())
51+ require.Equal(t, int64(1), trace.milestones[1].Delta.Milliseconds())
52+}
53+
39 func TestStartupTraceFinishCannotFabricateFirstGTKPresentation(t *testing.T) {54 func TestStartupTraceFinishCannotFabricateFirstGTKPresentation(t *testing.T) {
40 now := time.Unix(100, 0)55 now := time.Unix(100, 0)
41 trace := newStartupTrace(func() time.Time { return now })56 trace := newStartupTrace(func() time.Time { return now })
M vendor/github.com/bnema/purego-cef2gtk/handlers.go +85 -14 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/view.go +25 -2 generated file: collapsed
M vendor/modules.txt +1 -1 generated file: collapsed

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close