Skip to content

Commit b6a7c32

Browse files
authored
Merge pull request #3 from otectus/claude/map-archer-codebase-XxiUl
Enhance security, logging, and testing across modules
2 parents c9a05ec + c77c683 commit b6a7c32

34 files changed

Lines changed: 478 additions & 272 deletions

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# EditorConfig for Archer Compatibility Suite
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
insert_final_newline = true
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
12+
[*.sh]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[*.py]
17+
indent_style = space
18+
indent_size = 4
19+
20+
[*.{yml,yaml}]
21+
indent_style = space
22+
indent_size = 2
23+
24+
[*.md]
25+
trim_trailing_whitespace = false
26+
27+
[Makefile]
28+
indent_style = tab

.shellcheckrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ShellCheck configuration for Archer Compatibility Suite
2+
# https://www.shellcheck.net/wiki/
3+
4+
# We use Bash-specific features throughout (set via #!/usr/bin/env bash)
5+
shell=bash
6+
7+
# Allow sourcing from paths relative to the script
8+
source-path=SCRIPTDIR
9+
source-path=SCRIPTDIR/lib
10+
11+
# SC2034: Variable appears unused — module scripts set variables consumed by install.sh
12+
disable=SC2034
13+
14+
# SC1090: Can't follow non-constant source — modules are sourced dynamically
15+
disable=SC1090
16+
17+
# SC1091: Not following sourced file — shellcheck can't resolve dynamic paths
18+
disable=SC1091

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ The installer will:
163163
| `--verify` | Check status of previously installed modules |
164164
| `--no-confirm` | Skip all confirmation prompts |
165165
| `--dry-run` | Show what would be done without making changes |
166+
| `--verbose` | Enable debug output for troubleshooting |
167+
| `--log FILE` | Write all output to FILE (in addition to console) |
166168
| `--help`, `-h` | Show help message |
167169
| `--version`, `-v` | Show installer version |
168170

gui/archer/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import gi
77
gi.require_version("Gtk", "4.0")
88
gi.require_version("Adw", "1")
9-
from gi.repository import Adw, Gio, GLib
9+
from gi.repository import Adw, Gio
1010

1111
from archer.window import ArcherWindow
1212

gui/archer/pages/battery.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import gi
66
gi.require_version("Gtk", "4.0")
77
gi.require_version("Adw", "1")
8-
from gi.repository import Gtk, Adw, GLib
8+
from gi.repository import Gtk, Adw
99

1010
import threading
1111

@@ -27,8 +27,9 @@ def _build_ui(self):
2727
self.status_group = Adw.PreferencesGroup(title="Battery Status")
2828

2929
self.bat_percentage_row = Adw.ActionRow(title="Charge Level", subtitle="--")
30-
self.bat_percentage_bar = Gtk.LevelBar(min_value=0, max_value=100, hexpand=True,
31-
valign=Gtk.Align.CENTER)
30+
self.bat_percentage_bar = Gtk.LevelBar(
31+
min_value=0, max_value=100, hexpand=True,
32+
valign=Gtk.Align.CENTER)
3233
self.bat_percentage_bar.set_size_request(200, -1)
3334
self.bat_percentage_row.add_suffix(self.bat_percentage_bar)
3435
self.status_group.add(self.bat_percentage_row)
@@ -67,8 +68,9 @@ def _build_ui(self):
6768
self.calibration_group.add(self.calibration_status_row)
6869

6970
# Calibration buttons
70-
cal_button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=12,
71-
halign=Gtk.Align.CENTER, margin_top=12)
71+
cal_button_box = Gtk.Box(
72+
orientation=Gtk.Orientation.HORIZONTAL, spacing=12,
73+
halign=Gtk.Align.CENTER, margin_top=12)
7274

7375
self.start_cal_button = Gtk.Button(label="Start Calibration")
7476
self.start_cal_button.add_css_class("suggested-action")
@@ -124,8 +126,9 @@ def _build_ui(self):
124126
orientation=Gtk.Orientation.VERTICAL,
125127
valign=Gtk.Align.CENTER, vexpand=True, spacing=12,
126128
)
127-
no_bat_icon = Gtk.Image(icon_name="battery-missing-symbolic", pixel_size=64,
128-
opacity=0.5)
129+
no_bat_icon = Gtk.Image(
130+
icon_name="battery-missing-symbolic", pixel_size=64,
131+
opacity=0.5)
129132
no_bat_label = Gtk.Label(label="No battery detected")
130133
no_bat_label.add_css_class("title-2")
131134
no_bat_label.set_opacity(0.5)

gui/archer/pages/dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
gi.require_version("Gtk", "4.0")
1010
gi.require_version("Adw", "1")
11-
from gi.repository import Gtk, Adw, GLib
11+
from gi.repository import Gtk, Adw
1212

1313
# ---------------------------------------------------------------------------
1414
# Constants

gui/archer/pages/internals.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import gi
66
gi.require_version("Gtk", "4.0")
77
gi.require_version("Adw", "1")
8-
from gi.repository import Gtk, Adw, GLib
8+
from gi.repository import Gtk, Adw
99

1010
import threading
1111

@@ -56,8 +56,9 @@ def _build_ui(self):
5656
onetime_buttons.append(btn_all)
5757

5858
onetime_row = Adw.PreferencesRow()
59-
onetime_inner = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,
60-
margin_start=12, margin_end=12, margin_bottom=12)
59+
onetime_inner = Gtk.Box(
60+
orientation=Gtk.Orientation.VERTICAL,
61+
margin_start=12, margin_end=12, margin_bottom=12)
6162
onetime_inner.append(onetime_buttons)
6263
onetime_row.set_child(onetime_inner)
6364
onetime_group.add(onetime_row)
@@ -81,13 +82,15 @@ def _build_ui(self):
8182
self.override_combo.set_selected(0)
8283
permanent_group.add(self.override_combo)
8384

84-
apply_override_btn = Gtk.Button(label="Apply Override", halign=Gtk.Align.CENTER,
85-
margin_top=8, margin_bottom=8)
85+
apply_override_btn = Gtk.Button(
86+
label="Apply Override", halign=Gtk.Align.CENTER,
87+
margin_top=8, margin_bottom=8)
8688
apply_override_btn.add_css_class("suggested-action")
8789
apply_override_btn.connect("clicked", self._on_apply_override)
8890
override_row = Adw.PreferencesRow()
89-
override_inner = Gtk.Box(margin_start=12, margin_end=12, margin_bottom=12,
90-
halign=Gtk.Align.CENTER)
91+
override_inner = Gtk.Box(
92+
margin_start=12, margin_end=12, margin_bottom=12,
93+
halign=Gtk.Align.CENTER)
9194
override_inner.append(apply_override_btn)
9295
override_row.set_child(override_inner)
9396
permanent_group.add(override_row)

gui/archer/pages/keyboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
gi.require_version("Gtk", "4.0")
1212
gi.require_version("Adw", "1")
13-
from gi.repository import Gtk, Adw, Gdk, GLib
13+
from gi.repository import Gtk, Adw, Gdk
1414

1515

1616
# ── helpers ──────────────────────────────────────────────────────────

gui/archer/pages/system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import gi
66
gi.require_version("Gtk", "4.0")
77
gi.require_version("Adw", "1")
8-
from gi.repository import Gtk, Adw, GLib
8+
from gi.repository import Gtk, Adw
99

1010
import threading
1111
import subprocess

gui/archer/window.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def _on_settings_loaded(self, data):
154154
self.status_label.add_css_class("status-connected")
155155

156156
# Push settings to all pages
157-
features = data.get("features", [])
158157
self.dashboard_page.load_settings(data)
159158
self.performance_page.load_settings(data)
160159
self.battery_page.load_settings(data)

0 commit comments

Comments
 (0)