Guidance for AI agents working in this repository.
This repository contains the GNOME Shell extension messagingmenu@lauinger-clan.de.
It adds a panel indicator for installed email, chat, and microblogging apps and
changes the indicator state when matching notifications are present.
The code is a small GJS/GTK project, not a web app. Prefer GNOME Shell and GJS APIs over browser or Node patterns.
messagingmenu@lauinger-clan.de/extension.js: runtime GNOME Shell extension.messagingmenu@lauinger-clan.de/prefs.js: preferences window, built with GTK4/libadwaita.messagingmenu@lauinger-clan.de/metadata.json: extension metadata, UUID, shell versions, release version.messagingmenu@lauinger-clan.de/schemas/org.gnome.shell.extensions.messagingmenu.gschema.xml: GSettings schema and defaults.messagingmenu@lauinger-clan.de/ui/prefs.ui: GtkBuilder UI for preferences.po/: gettext template and translations.messagingmenu.sh: helper for packing, installing, uploading, and updating translations..github/workflows/: CI, release, and stale issue workflows.
npm run lint: run ESLint across the repository../messagingmenu.sh zip: buildmessagingmenu@lauinger-clan.de.shell-extension.zip../messagingmenu.sh install: build if needed, install, and enable the extension locally../messagingmenu.sh translate: regeneratepo/messagingmenu.potand update existing.pofiles.
There is no useful automated test suite at the moment. npm test intentionally
fails with the default placeholder script. For behavioral changes, use linting
plus manual GNOME Shell testing where possible.
- The package uses ES modules (
"type": "module") and GJS imports such asgi://Gioandresource:///org/gnome/shell/.... - Keep compatibility with the shell versions listed in
metadata.json. - Runtime code lives in
extension.js; preferences UI behavior lives inprefs.js. - App matching is driven by semicolon-delimited GSettings strings in the schema. When changing defaults, update the schema and consider whether preferences UI display, scanning, and translations need corresponding changes.
- Notification matching happens through GNOME Shell's
Main.messageTraysources. Be careful with null/undefined checks because sources can differ by app and GNOME Shell version. - The extension uses gettext. Wrap new user-visible strings with
_()orngettext()as appropriate, then run./messagingmenu.sh translatewhen the string set changes. - The release workflow builds with
dbus-run-session -- ./messagingmenu.sh zip. Avoid changing packaging behavior without checking.github/workflows/release.yml. - Check
gnome-extension-review.mdwhen changing runtime, preferences, metadata, schema, packaging, or user-data behavior that may affect extensions.gnome.org review.
If a change adds, removes, or edits user-visible strings wrapped for translation, remind the user to run:
./messagingmenu.sh translateDo not update translations automatically unless the user asks, because it may touch many po/ files.
- Follow
.editorconfigand.prettierrc: spaces, LF, final newline, 4-space indentation for JS/CSS, double quotes, semicolons, and 120-column print width. - ESLint config is in
eslint.config.jsand includes GJS-specific globals and restrictions. Prefer satisfyingnpm run lintover adding disables. - Keep code idiomatic for modern GJS: classes,
const/let, ES module imports, arrow functions where appropriate, andthis.getLogger()for extension logging. - Avoid broad refactors in this repo. The extension is compact, and targeted changes are easier to verify across GNOME Shell versions.
When a change touches runtime behavior:
- Run
npm run lint. - Build with
./messagingmenu.sh zip. - Install with
./messagingmenu.sh installon a GNOME Shell session when available. - Restart GNOME Shell or log out/in if needed.
- Verify the indicator appears, the menu opens, settings opens, and notification color/wiggle behavior still works for the affected app categories.
When a change touches preferences:
- Run
npm run lint. - Open the extension preferences from GNOME Extensions or middle-click the panel indicator.
- Verify switches, color selection, app add/select/scan flows, reset behavior, and list population.
When a change touches translations:
- Run
./messagingmenu.sh translate. - Review changes in
po/messagingmenu.potand existing.pofiles. - Do not hand-edit unrelated translated strings.
- Do not commit generated extension zip files unless explicitly requested.
- Do not change
metadata.jsonversion or shell compatibility casually; those values affect release and extensions.gnome.org behavior. - Respect existing user changes in the working tree. Read before editing files that are already modified.