Commit graph

137 commits

Author SHA1 Message Date
Johannes Millan
ddc01ab6cf build(electron): exclude uuidv7 and guard against future asar regressions
uuidv7 is imported only from src/app/util/uuid-v7.ts; the Angular
bundler inlines it (verified via chunk-65AEYVPY.js.map source
attribution). Adding it to the three electron-builder configs drops
another ~80 KB from the asar.

Extend tools/verify-electron-requires.js to also flag bare require()
targets in electron/ that match a `\!**/<pkg>/**` exclusion in
electron-builder.yaml. Without this, adding `require('@noble/ciphers')`
or similar in electron/main.ts would pass dev (which resolves against
on-disk node_modules) and only crash with MODULE_NOT_FOUND on packaged
releases. The script is already invoked from .github/workflows/
electron-smoke.yml, so the new check runs in CI automatically.

Manual verification covers 14 cases (8 excluded, 6 allowed) including
@noble/ciphers, @noble/hashes, scoped-vs-bare resolution, and Node
built-ins.
2026-05-13 21:22:59 +02:00
David Vornholt
a7845acd81
fix(electron): retry Wayland idle helper startup (#7527)
* fix(electron): retry wayland idle helper startup

* build(electron): enforce wayland helper in CI

* fix(electron): avoid blocking wayland idle promotion

* test(e2e): make reminder option selector exact

* test(e2e): resolve reminder option selector conflict

* fix(electron): gate wayland helper redetection

* fix(electron): avoid stale Wayland helper packaging

---------

Co-authored-by: Johannes Millan <johannes.millan@gmail.com>
2026-05-10 22:35:33 +02:00
johannesjo
17e664f2fc build(release): add automated release notes 2026-05-10 00:24:47 +02:00
Johannes Millan
90abae0c3b fix(linux): align wrapper wm class with desktop entry 2026-05-09 18:11:40 +02:00
David Vornholt
0988c2d8c6
Add ext-idle-notify backend for Wayland idle detection (#7337)
* fix(electron): support Wayland idle detection via ext-idle-notify

* fix(electron): address wayland idle helper review

---------

Co-authored-by: Johannes Millan <johannesjo@users.noreply.github.com>
2026-04-24 16:50:24 +02:00
Johannes Millan
e72aa77336
Add Electron packaging smoke test to catch missing dependencies (#7336)
* ci(electron): verify packaged app.asar and smoke-test launch

Adds coverage for the gap that let #7320 ship: CI built electron TS
and ran electron-builder on release, but never exercised the packaged
binary. A stray relative import reaching out of electron/** was
compiled by tsc into src/app/util/*.js, fell outside the files glob
in electron-builder.yaml, and was missing from app.asar — the main
process crashed on launch for every 18.2.7 user.

Two new checks, both running on ubuntu-latest:

1. tools/verify-electron-requires.js extracts app.asar and re-resolves
   every relative require() under electron/** against the packaged
   tree. Runs on every PR that touches electron/**, electron-builder
   config, package.json, or the workflow itself. ~10s after the build.

2. A launch-under-xvfb smoke test starts the packaged binary, waits
   30s for a crash, and greps stderr for 'Cannot find module' /
   'Uncaught Exception'. Runs on push to master, release tags, and
   manual dispatch (not every PR — needs xvfb setup + idle wait).

Exposed as npm run electron:verify-asar for local use after dist.

* ci(electron): harden smoke workflow and verify script from review

Review feedback on the previous commit surfaced a handful of real
defects. Addressed here:

verify-electron-requires.js
- Guard resolved paths against escaping the extracted asar tree.
  Without this, a relative require with enough `..` climbs above the
  temp dir and Node's resolver hits the host filesystem, masking a
  genuinely missing module behind a stray file on the CI runner.
- Walk .cjs and .mjs files too. electron/simple-store.test.cjs ships
  via the `electron/**/*` glob and was being skipped.
- Move cleanup out of the path where `process.exit(1)` runs inside a
  `try/finally` (synchronous exit does not guarantee `finally`), so
  the temp dir is reliably removed.
- Code comment noting that esbuild-bundled preload.js is opaque to
  this walker — that coverage comes from the launch smoke test.

electron-smoke.yml
- Broaden pull_request paths filter. The previous filter only matched
  electron/**, which is exactly the wrong answer: #7320's root cause
  was a file under src/app/util/ that electron/ imported. Now uses a
  negative list — docs, translations, android/, ios/, other workflows.
- Explicit Xvfb screen geometry (`-screen 0 1280x720x24`) and
  `--disable-dev-shm-usage` on the Electron side. Both known CI
  flake preventers.
- Expanded crash-marker regex: SIGSEGV, Segmentation fault,
  TypeError:, ReferenceError:, FATAL ERROR, Check failed. Also scan
  the log during the liveness loop, not just at the end — catches
  main-process exceptions that get logged without killing the
  process.
- Move the launch log under .tmp/smoke/ so upload-artifact@v7 reliably
  finds it on failure; /tmp paths are fragile across runner images.
- Sweep stray electron worker processes on teardown via pkill.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 21:53:28 +02:00
Johannes Millan
297aeb30ab fix(electron): harden Snap+Wayland argv wrapper after multi-review
Address findings from code-reviewer + debugger-assistant +
refactor-specialist multi-review on 8e1c47ebc2:

- afterPack: read wrapper source before rename; on writeFile failure,
  roll the rename back so a broken intermediate state can't ship a
  package with no launcher. Strengthen idempotency check to require a
  shebang at binPath (both files alone no longer counts as "installed").
- wrapper: gate the X11 injection on \$SNAP_NAME = "superproductivity",
  not just \$SNAP set. An xdg-open from a sibling snap (e.g. Firefox)
  leaks \$SNAP into the child env, which previously would have silently
  forced XWayland on .deb/.rpm users. Derive BIN_DIR from \$SNAP
  directly when we are our snap, avoiding fragile \$0 resolution
  through snapd's wrapper chain. Stop argv scanning at -- so positional
  args that resemble --ozone-platform aren't misread as a user override.
- app-control: point app.relaunch() execPath at the sibling shell
  wrapper instead of the default process.execPath (which is the renamed
  ELF and would bypass the flag injection on a relaunched Snap+Wayland
  instance).
- Move build/snap-wrapper.sh -> build/linux/snap-wrapper.sh to match
  the existing build/linux/ layout convention.
- Update research doc §18 to reflect the tightened predicate and the
  relaunch fix.
2026-04-21 15:03:42 +02:00
Johannes Millan
7f503c9bf0 fix(electron): inject ozone-platform=x11 via argv wrapper for Snap+Wayland
Field reports on issue #7270 (v18.2.4 / v18.2.5) show that
app.commandLine.appendSwitch('ozone-platform','x11') is not equivalent
to the CLI flag on Snap+Wayland: Chromium's Ozone init dlopens
libEGL/libgbm on the core22 Mesa path before the switch is honored and
segfaults under host-vs-snap Mesa ABI drift, while the same flag on
argv consistently works.

Install an afterPack hook that renames the Electron binary and drops a
shell wrapper at the original name. The wrapper injects the flag into
argv only when \$SNAP is set AND the session is Wayland — non-Snap
targets (AppImage, .deb, .rpm) and X11 sessions pass through untouched.
Matches the mechanism used by snapcrafters/signal-desktop and
snapcrafters/mattermost-desktop.

See docs/research/snap-wayland-gpu-fix-research.md §18 for the full
evidence trail, drawbacks, validation plan, and removal conditions.
2026-04-21 15:03:42 +02:00
Johannes Millan
681a6cd2ee fix(build): remove sharp from deps to fix F-Droid build
sharp is a native C++ module that fails to compile in F-Droid's
build environment. It is only used by manual icon generation scripts,
so auto-install it on demand instead.

Closes #6637
2026-03-29 19:57:10 +02:00
Johannes Millan
83800f29e9 fix(ci): guard app-state selectors against undefined and bump lighthouse budgets
App-state selectors crashed during test teardown when the feature store
was unregistered. Lighthouse resource count budgets increased for the
new deadline feature chunks (scripts 170→200, total 220→250).
2026-03-14 13:04:44 +01:00
Johannes Millan
324460dae4 perf: consolidate lazy route chunks (251 → 151)
Group individual loadComponent routes into fewer lazy chunks:
- Tag + project sub-routes share one chunk via context.routes.ts
  using loadChildren with static component imports
- Standalone pages share one chunk via pages.routes.ts barrel
  re-export with loadComponent importing from same module
- Use canActivateChild for FocusOverlayOpenGuard so it re-fires
  when navigating between child routes within the same context

Lighthouse resource budgets updated to match new chunk count.
2026-03-12 12:25:52 +01:00
Johannes Millan
9d488fc237 build(lighthouse): increase resource count budgets
Build now produces 251 script and 295 total resources due to Angular
code-splitting. Raise thresholds to 270/320 to match current output.
2026-03-12 10:54:00 +01:00
Johannes Millan
34bf1d8277 fix(build): auto-generate env.generated.ts on checkout via husky hook 2026-03-06 16:39:21 +01:00
Johannes Millan
c698597af9 fix(build): ensure env.generated.ts exists before ng serve
Add --ensure flag to load-env.js that skips generation if
env.generated.ts already exists, allowing ng serve to work in
fresh worktrees without running npm run env first.

Also make load-env.js idempotent by comparing content before
writing and removing the timestamp from generated output.
2026-03-06 12:35:38 +01:00
Johannes Millan
8fe938a5f8 fix(build): fix tag resolution and add error handling in bump-android-version
The previous two-tag approach (`currentTag` → `prevTag`) would resolve the
wrong changelog range during `npm version` since the new tag doesn't exist
yet. Simplified to a single `lastTag...HEAD` range which correctly captures
all commits since the last release.

Added try-catch with fallback to last 20 commits when no tags exist, and
a fallback message for empty changelogs.
2026-03-05 16:45:05 +01:00
Johannes Millan
1272d6e7bf chore: replace CHANGELOG.md with git-based release notes
Remove the 15k-line auto-generated CHANGELOG.md and its conventional-changelog
tooling. The bump-android-version script now derives Play Store fastlane
changelogs from git log between tags instead of parsing CHANGELOG.md.

- Use execFileSync with argv to avoid shell injection
- Filter merge commits with --no-merges
- Handle breaking-change prefix (feat!:) in regex
- Truncate at line boundaries for 500-char Play Store limit
- Remove conventional-changelog-cli and @conventional-changelog/git-client deps
- Remove release.changelog script from package.json
2026-03-04 19:38:37 +01:00
Johannes Millan
2b99c41efb fix: remove white borders from macOS icon (#6323)
Remove the flatten-with-white-background step from the icon generator.
macOS .icns natively supports PNG with alpha, so the flatten was
unnecessarily filling transparent areas outside the squircle mask
with white, causing visible borders in the Dock and Finder.
2026-02-10 14:41:16 +01:00
Johannes Millan
8b645c33ea fix(icons): resolve macOS icon black edge artifacts
Split Sharp pipeline into two stages to fix edge pixel blending.
When chained directly, dest-in composite and flatten don't properly
preserve alpha channel data, causing edges to retain the original
icon color instead of blending with the white background.

Fixes #6323
2026-02-05 11:56:59 +01:00
Johannes Millan
60203003f0 fix(build): update glob API and remove unused Angular imports
Use globSync instead of callback-based glob (breaking change in glob v9+).
Remove unused MatHint and AsyncPipe imports to fix NG8113 warnings.
2026-02-04 18:30:51 +01:00
Johannes Millan
4eb06b3db6 fix(build): use Apple continuous-corner bezier curves for mac icon squircle
Replace simple SVG rounded rect (circular arcs) with Apple's actual
continuous-corner shape reverse-engineered from UIBezierPath. This
produces the correct squircle with smooth curvature transitions.
2026-02-02 17:15:13 +01:00
Johannes Millan
cc5940a257 chore(build): add mac icon generator and update icon assets 2026-02-02 17:15:13 +01:00
Serif
bc3df77e3f
feat(tools): enhance translation management script (#6171)
- Add extract and merge modes to manage missing translations
- Implement functions to extract missing keys and merge WIP files
- Create usage documentation for the translation management script
2026-01-25 18:08:06 +01:00
Claude
47001a1228
fix(lighthouse): increase font budget for Material Symbols upgrade
The font budget was set to 260KB before the Material Icons to Material
Symbols upgrade. Material Symbols font is ~456KB, causing Lighthouse CI
to fail. Increase budget to 520KB to accommodate the larger font with
headroom for future updates.
2026-01-21 23:18:58 +00:00
Johannes Millan
709e688d6d feat(icons): upgrade from Material Icons to Material Symbols
- Replace legacy Material Icons (2,008 icons) with Material Symbols (3,798 icons)
- Adds missing icons reported in issue #6079: robot_2, manufacturing, cognition, cognition_2, neurology
- Update font: MaterialIcons-Regular.ttf (349KB) -> material-symbols-outlined.woff2 (456KB)
- Update icon names constant with 1,790 additional icons (+89% increase)
- Create extraction script for future icon updates
- Configure filled style to match previous appearance

Resolves #6079
2026-01-21 15:30:19 +01:00
Johannes Millan
f2c1c2ab5e fix(ios): remove white frame from app icon by eliminating alpha channel
iOS renders transparent pixels as white, causing a white frame around the
app icon. This fix generates a 1024x1024 RGB PNG (no alpha channel) from
the existing build/icons/sq2160x2160.png source.

Changes:
- Add tools/generate-ios-icon.js script using Sharp to resize and remove alpha
- Add npm script 'generate:ios-icon' for reproducible icon generation
- Update AppIcon-512@2x.png to RGB format (was RGBA)
- Install Sharp as dev dependency for image processing

Icon is now fully opaque with correct brand blue color and white checkmark.
2026-01-20 17:07:24 +01:00
Johannes Millan
b583454327 fix(android): support pre-release versions in APK builds
- Update bump-android-version.js to handle RC/alpha/beta versions
- Pre-releases use versionCode suffix 0001-8999, stable uses 9000
- This ensures users can upgrade from RC to stable without uninstalling
- Skip Play Store upload for pre-release tags (GitHub only)
- Skip fastlane changelog generation for pre-releases

Fixes #5964
2026-01-12 15:25:18 +01:00
Johannes Millan
124ab686ed chore(i18n): remove 228 unimplemented feature translation keys
Remove translation keys for features that were planned but never
implemented, including:

- F.FOCUS_MODE.* (11) - planned focus mode extensions
- F.JIRA.STEPPER.* (5) - setup wizard never built
- F.METRIC.EVAL_FORM.* (15) - unused evaluation fields
- F.SYNC.* (36) - unused error states and dialogs
- F.TASK.* (29) - unused task bar and reminder keys
- F.PROJECT.D_CREATE.SETUP_* (7) - issue provider setup wizards
- F.ISSUE.*/JIRA.*/GITEA.*/etc (various) - unused provider keys
- MH.*/GCF.*/PLUGINS.*/G.* (various) - miscellaneous unused

Remaining 18 "unused" keys are false positives due to dynamic
object access pattern (F.TAG_FOLDER.*, F.PROJECT_FOLDER.*).

Total translation keys: 1965 → 1594 (371 removed, 19% reduction)
2026-01-09 15:00:36 +01:00
Johannes Millan
af4e622f91 chore(i18n): remove additional 86 orphan translation keys
Remove keys that are duplicates, never implemented, or obsolete:
- F.SAFETY_BACKUP.* (32) - orphan duplicate of F.SYNC.SAFETY_BACKUP
- F.PROCRASTINATION.* (32) - feature never implemented
- GCF.PAST.* (11) - orphan duplicate of GLOBAL_RELATIVE_TIME.PAST
- GCF.TIMELINE.* (10) - settings form never implemented
- WW.HELP_PROCRASTINATION (1) - related to unimplemented feature

Total unused keys reduced: 350 → 264
Remaining 264 keys need case-by-case review (planned features,
dynamic object access patterns, edge cases).

Add docs/unused-translations-analysis.md with detailed findings.
2026-01-09 14:59:05 +01:00
Johannes Millan
12d315a703 chore(i18n): add unused translation scanner and remove orphaned keys
Add tools to detect and clean up unused translation keys:
- find-unused-translations.js: scans for T.* and string literal patterns
- cleanup-unused-translations.js: removes specified orphaned sections

Remove 34 orphaned translation keys from all 25 language files:
- ANDROID.* (5 keys) - code removed in previous commits
- THEMES.* (17 keys) - never used, themes use hardcoded names
- F.CALDAV.ISSUE_CONTENT.* (12 keys) - never wired up

Convert string literal translation keys to T.* pattern in:
- dialog-user-profile-management component
- user-profile-button component
- plugin-management component
- config-sound-form component
- lazy-chart component
2026-01-09 14:59:05 +01:00
Johannes Millan
c4023b4f45 fix(security): address CodeQL security alerts
- Fix incomplete HTML sanitization in errors.ts (alerts #50-52)
  Apply regex repeatedly to handle nested inputs like <scri<script>pt>
- Add lgtm comment for intentional cert bypass in jira.ts (alert #40)
- Fix incomplete string escaping in load-env.js (alert #39)
  Escape backslashes before quotes
- Fix shell command injection in check-file.js (alerts #37-38)
  Use execFileSync with args array instead of string interpolation
2025-12-23 13:42:57 +01:00
Nicholas
a6f1649e24 Add setting for default start page 2025-11-19 20:11:21 -05:00
Johannes Millan
5e43c022d6 build: fix lighthouse again 5 2025-10-30 17:53:02 +01:00
Johannes Millan
911e81deb4 build: fix lighthouse again 4 2025-10-30 17:45:12 +01:00
Johannes Millan
f57c178981 build: fix lighthouse again 3 2025-10-30 17:43:49 +01:00
Johannes Millan
ae0a8f84f8 build: fix lighthouse again 2 2025-10-30 17:25:43 +01:00
Johannes Millan
df014a9933 build: fix lighthouse again 2025-10-30 16:54:21 +01:00
Johannes Millan
cab1043a46 build: restore old lighthouse-ci.yml cfg 2025-10-30 16:21:41 +01:00
Johannes Millan
05286eb6c3 Revert "build: attempt to fix lighthouse check"
This reverts commit e2c4579c12.
2025-10-29 19:40:18 +01:00
Johannes Millan
85360ce039 Revert "build: try to fix lighthouse"
This reverts commit af93197dff.
2025-10-29 19:40:18 +01:00
Johannes Millan
e271e130e6 Revert "build: try to fix lighthouse 2"
This reverts commit 562251e2d5.
2025-10-29 19:40:18 +01:00
Johannes Millan
ac833bf70c Revert "build: try to fix lighthouse 3"
This reverts commit 6e5e237856.
2025-10-29 19:40:18 +01:00
Johannes Millan
6e5e237856 build: try to fix lighthouse 3 2025-10-29 19:05:06 +01:00
Johannes Millan
562251e2d5 build: try to fix lighthouse 2 2025-10-29 18:50:34 +01:00
Johannes Millan
af93197dff build: try to fix lighthouse 2025-10-29 18:22:08 +01:00
Johannes Millan
e2c4579c12 build: attempt to fix lighthouse check 2025-10-29 17:15:39 +01:00
Johannes Millan
44b604ce65 build: fix lighthouse 2025-10-28 15:04:22 +01:00
Johannes Millan
ce22606bf3 build: unify lighthouse config 2025-10-23 18:54:32 +02:00
Harshita
3696d62fba fix: properly handle single emoji as project icon 2025-09-20 20:14:06 +05:30
Johannes Millan
cca789c0ce refactor: improve code quality 2025-09-13 14:04:18 +02:00
Johannes Millan
6b7f6a698b Merge remote-tracking branch 'origin/master'
* origin/master:
  feat: add script to update missing i18n keys from en.json
  feat: add missing Turkish translations
2025-09-13 13:56:20 +02:00