2 views
lightpanda-io/browser
Lightpanda: the headless browser designed for AI and automation
Zig★ 40,413+825 that day#1 on trending
D48.9/100
Duplication57
6.8% in zig, linker-script, rust, javascript, nix, bash, python, makefile, docker, goDead coden/a
the languages dead code reads are under 5% of the codeComplexity42
63.6% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
7.02%duplicated code · 21,278 of 303,091 lines
1,811clones in code
702code files of 1,300 scanned
5.99%duplicated over all files · 2,078 clones
Most complex files
- src/network/HttpClient.zig683 cx
- src/browser/StyleManager.zig588 cx
- src/browser/frame/user_input.zig571 cx
- src/browser/Frame.zig570 cx
- src/agent/Agent.zig445 cx
- src/browser/tools.zig400 cx
- src/browser/webapi/element/html/Input.zig399 cx
- src/browser/webapi/Element.zig358 cx
- src/browser/webapi/URLPattern.zig344 cx
- src/browser/webapi/Document.zig320 cx
Dead code 0.05% unused · 1 findings
- orderfile/tools/pagemap.py:osunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 18 lines in 22 placeszig145 tokenssrc/server/cdp/domains/input.zig:443–460src/server/cdp/domains/input.zig:484–501src/server/cdp/domains/input.zig:522–539src/server/cdp/domains/input.zig:581–598src/server/cdp/domains/input.zig:635–652and 17 more
443var ctx = try testing.context(); 444defer ctx.deinit(); 445 446const bc = try ctx.loadBrowserContext(.{}); 447const page = try bc.session.createPage(); 448const frame = page.frame().?; 449 450const url = "http://localhost:9582/src/browser/tests/mcp_actions.html"; 451try frame.navigate(url, .{ .reason = .address_bar, .kind = .{ .push = null } }); 452try testing.waitForPage(bc);First 10 of 18 lines.
- 12 lines in 20 placeszig89 tokenssrc/server/cdp/domains/input.zig:1438–1449src/server/cdp/domains/input.zig:1542–1554src/server/cdp/domains/input.zig:1738–1748src/server/cdp/domains/input.zig:1813–1825src/server/cdp/domains/input.zig:1864–1876and 15 more
1438test "cdp.input: dispatchTouchEvent reports the client's radius, angle and force" { 1439 var ctx = try testing.context(); 1440 defer ctx.deinit(); 1441 1442 const bc = try ctx.loadBrowserContext(.{ .url = "mcp_actions.html" }); 1443 const frame = bc.mainFrame().?; 1444 1445 var ls: lp.js.Local.Scope = undefined; 1446 frame.js.localScope(&ls); 1447 defer ls.deinit();First 10 of 12 lines.
- 7 lines in 26 placeszig54 tokenssrc/server/cdp/domains/input.zig:302–308src/server/cdp/domains/input.zig:398–404src/server/cdp/domains/input.zig:442–448src/server/cdp/domains/input.zig:483–489src/server/cdp/domains/input.zig:521–527and 21 more
302test "cdp.input: insertText is a user edit for tooLong" { 303 var ctx = try testing.context(); 304 defer ctx.deinit(); 305 306 const bc = try ctx.loadBrowserContext(.{}); 307 const page = try bc.session.createPage(); 308 const frame = page.frame().?;
7 more
- 8 lines in 25 placeszig52 tokens
- 26 lines in 17 placeszig72 tokens
- 23 lines in 14 placeszig67 tokens
- 26 lines in 15 placeszig60 tokens
- 24 lines in 15 placeszig54 tokens
- 24 lines in 15 placeszig53 tokens
- 14 lines in 12 placeszig58 tokens
Largest clones over all files, tests and data included
- 18 lines in 22 placeszig145 tokenssrc/server/cdp/domains/input.zig:443–460src/server/cdp/domains/input.zig:484–501src/server/cdp/domains/input.zig:522–539src/server/cdp/domains/input.zig:581–598src/server/cdp/domains/input.zig:635–652and 17 more
443var ctx = try testing.context(); 444defer ctx.deinit(); 445 446const bc = try ctx.loadBrowserContext(.{}); 447const page = try bc.session.createPage(); 448const frame = page.frame().?; 449 450const url = "http://localhost:9582/src/browser/tests/mcp_actions.html"; 451try frame.navigate(url, .{ .reason = .address_bar, .kind = .{ .push = null } }); 452try testing.waitForPage(bc);First 10 of 18 lines.
- 12 lines in 20 placeszig89 tokenssrc/server/cdp/domains/input.zig:1438–1449src/server/cdp/domains/input.zig:1542–1554src/server/cdp/domains/input.zig:1738–1748src/server/cdp/domains/input.zig:1813–1825src/server/cdp/domains/input.zig:1864–1876and 15 more
1438test "cdp.input: dispatchTouchEvent reports the client's radius, angle and force" { 1439 var ctx = try testing.context(); 1440 defer ctx.deinit(); 1441 1442 const bc = try ctx.loadBrowserContext(.{ .url = "mcp_actions.html" }); 1443 const frame = bc.mainFrame().?; 1444 1445 var ls: lp.js.Local.Scope = undefined; 1446 frame.js.localScope(&ls); 1447 defer ls.deinit();First 10 of 12 lines.
- 7 lines in 26 placeszig54 tokenssrc/server/cdp/domains/input.zig:302–308src/server/cdp/domains/input.zig:398–404src/server/cdp/domains/input.zig:442–448src/server/cdp/domains/input.zig:483–489src/server/cdp/domains/input.zig:521–527and 21 more
302test "cdp.input: insertText is a user edit for tooLong" { 303 var ctx = try testing.context(); 304 defer ctx.deinit(); 305 306 const bc = try ctx.loadBrowserContext(.{}); 307 const page = try bc.session.createPage(); 308 const frame = page.frame().?; - 8 lines in 25 placeszig52 tokens
- 26 lines in 17 placeszig72 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| zig | 689 | 298,181 | 1,787 | 20,928 | 7.02% |
| rust | 6 | 4,425 | 24 | 350 | 7.91% |
| bash | 3 | 274 | 0 | 0 | 0% |
| python | 3 | 163 | 0 | 0 | 0% |
| go | 1 | 48 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| zig | 689 | 298,181 | 1,787 | 20,928 | 7.02% |
| markup | 537 | 89,319 | 243 | 2,641 | 2.96% |
| rust | 6 | 4,425 | 24 | 350 | 7.91% |
| yaml | 16 | 2,055 | 21 | 300 | 14.6% |
| javascript | 28 | 1,498 | 3 | 30 | 2% |
| linker-script | 1 | 6,803 | 0 | 0 | 0% |
| json | 1 | 852 | 0 | 0 | 0% |
| markdown | 6 | 817 | 0 | 0 | 0% |
| nix | 2 | 321 | 0 | 0 | 0% |
| bash | 5 | 295 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 2, 2026 | #1 | 40,413 (+825) | 1,300 | 405,116 | 2,078 | 5.99% | 7.02% | D 48.9 | 0e162ad |
| Nov 1, 2026 | #2 | 39,375 (+929) | 1,292 | 403,539 | 2,075 | 6% | 7.04% | D 48.8 | cebb8d5 |
| Oct 31, 2026 | #8 | 38,557 (+626) | 1,288 | 403,104 | 2,071 | 6% | 7.04% | D 48.8 | d3f56c1 |
| Sep 8, 2026 | #8 | 34,975 (+58) | 1,026 | 299,704 | 1,397 | 5.71% | 6.6% | — | 909108e |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.