Skip to content

Commit edb11c1

Browse files
committed
feat(ui): establish shared MailStack application shell
1 parent a4b5f40 commit edb11c1

40 files changed

Lines changed: 2246 additions & 304 deletions

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Describe the change and the operational problem it solves.
1919
- [ ] `python scripts/test_documents.py`
2020
- [ ] `python scripts/manage_designs.py --root . check`
2121
- [ ] `python scripts/test_designs.py`
22+
- [ ] `python scripts/test_ui_foundation.py`
2223
- [ ] `python scripts/check_documentation_policy.py --base HEAD^ --head HEAD`
2324

2425
## Verification

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ jobs:
5959
- name: UI design system tests
6060
run: python scripts/test_designs.py
6161

62+
- name: Shared UI foundation contract tests
63+
run: python scripts/test_ui_foundation.py
64+
6265
- name: Feature documentation policy
6366
env:
6467
DOCUMENTATION_BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
@@ -98,6 +101,12 @@ jobs:
98101
working-directory: public-site/contact_service
99102
run: python test_contact_app.py
100103

104+
- name: Contact service Ruff
105+
run: python -m ruff check --config mailbox-app/pyproject.toml public-site/contact_service/contact_app.py
106+
107+
- name: Contact service Bandit
108+
run: python -m bandit -c mailbox-app/.bandit -q public-site/contact_service/contact_app.py
109+
101110
- name: Django checks
102111
working-directory: mailbox-app
103112
run: |

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ All notable repository-level changes are recorded here. Application history befo
66

77
### Changed
88

9+
- Implemented PHASE-002 shared UI foundation and application shell with frozen design tokens, responsive authenticated navigation, an isolated sign-in shell, local SVG brand/icon assets, accessible focus handling, and preserved page business logic.
10+
- Added dependency-free UI foundation contract tests, Django shell functional tests, CI enforcement, forensic-audit integration, and synchronized user/design documentation.
11+
- Hardened cross-platform verification by deterministically closing contact-service SQLite connections, limiting POSIX permission assertions to POSIX runtimes, extending Ruff/Bandit coverage to the standalone contact service, and canonicalizing source-release ZIP host metadata and storage so Windows and Linux produce byte-identical archives.
912
- Imported and verified the complete 25-image MailStack UI and logo reference archive as `MAILSTACK-UI-DESIGN-INTAKE-001`.
1013
- Frozen `MAILSTACK-UI-FOUNDATION-001` with screen classification, component, responsive, accessibility, future-roadmap, and implementation-status specifications.
1114
- Added immutable design-asset hashing, PNG integrity validation, deterministic manifest synchronization, contract tests, CI gates, and forensic-audit integration.
12-
- Optimized deterministic source packaging by storing already-compressed media without redundant DEFLATE work.
15+
- Made deterministic source packaging independent of host ZIP metadata and zlib implementation by using canonical POSIX metadata, fixed timestamps, empty optional metadata, and stored entries for every release member.
1316
- Adopted **MailStack** as the public open-source project name.
1417
- Set `https://github.com/vibtools/MailStack` as the canonical repository.
1518
- Rebuilt the root README with SEO-oriented positioning for a self-hosted mail server and shared team inbox.

CONTRIBUTING.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ From the repository root:
2626
python scripts/manage_documents.py check
2727
python scripts/test_documents.py
2828
python scripts/check_documentation_policy.py --base HEAD^ --head HEAD
29+
python scripts/manage_designs.py --root . check
30+
python scripts/test_designs.py
31+
python scripts/test_ui_foundation.py
2932
python scripts/check_docs.py
3033
python scripts/validate_templates.py
3134
python scripts/test_installer.py
@@ -52,13 +55,13 @@ The full gate runs tests, coverage, Ruff, Bandit, Django checks, contact-service
5255
UI work must begin from the frozen design intake and shared foundation. Preserve original PNGs,
5356
update `design/DESIGN_MANIFEST.json` only through the maintained workflow, implement one page per
5457
reviewed patch, and do not activate planned controls without an approved backend/security phase.
55-
Run `python scripts/manage_designs.py --root . check` and `python scripts/test_designs.py`.
58+
Run `python scripts/manage_designs.py --root . check`, `python scripts/test_designs.py`, and `python scripts/test_ui_foundation.py`.
5659

5760
Start a maintained phase before implementation:
5861

5962
```bash
6063
python scripts/manage_documents.py new-phase \
61-
--phase-id PHASE-002 \
64+
--phase-id PHASE-003 \
6265
--title "Feature title" \
6366
--summary "What the phase changes for users"
6467
```

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Run the complete repository gate from the project root:
202202
```bash
203203
python scripts/manage_designs.py --root . check
204204
python scripts/test_designs.py
205+
python scripts/test_ui_foundation.py
205206
python scripts/forensic_audit.py --root . --full
206207
```
207208

ROADMAP.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ This roadmap is directional. Security, data integrity and backward compatibility
2121
## UI design baseline
2222

2323
- Preserve `MAILSTACK-UI-DESIGN-INTAKE-001` and `MAILSTACK-UI-FOUNDATION-001` as the approved visual reference baseline
24-
- Implement one existing page per reviewed patch after shared foundation work
24+
- Complete PHASE-002 shared runtime tokens, responsive application shell, local assets, and accessibility contracts
25+
- Implement one existing page per reviewed patch on top of the qualified shared foundation
2526
- Keep planned and future-review screens inactive until architecture and security phases approve them
2627
- Require responsive, accessibility, security, regression, documentation and CI evidence for each page
2728

docs/FOLDER_STRUCTURE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ mailbox-app/ Django team mailbox application
1515
deployment/ Legacy-compatible deployment assets
1616
requirements/ Pinned runtime and development dependencies
1717
scripts/ Backup, restore, deploy, health and verification tools
18-
static/ Application CSS and JavaScript
18+
static/ Application CSS, JavaScript, local brand assets and SVG icon sprite
19+
brand/ Runtime copy of the canonical MailStack logo
20+
css/ Existing page CSS and the frozen shared foundation layer
21+
icons/ Self-hosted shared SVG symbol sprite
1922
templates/ Django HTML templates
2023
tests/ Unit, integration, functional, reliability and security tests
2124
public-site/ Static site and isolated contact WSGI service
22-
scripts/ Repository audit, documentation, rendering, testing and release tools
25+
scripts/ Repository audit, documentation, UI contracts, rendering, testing and release tools
2326
install.sh Clean Ubuntu 24.04 installer
2427
VERSION Canonical release version
2528
```

docs/FORENSIC_AUDIT_REPORT.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Forensic audit report — MailStack 1.3.0 RC1
22

3-
**Baseline audit date:** 2026-07-24
3+
**Baseline audit date:** 2026-07-25
44
**Release version:** `1.3.0-rc.1`
55
**Target runtime:** Ubuntu Server 24.04 LTS and CPython 3.12
66
**Release classification:** CI-qualified and clean-clone-qualified open-source release candidate
@@ -12,13 +12,15 @@
1212
| Baseline feature preservation | PASS |
1313
| Repository structure and public documentation | PASS |
1414
| User manual, how-to, admin guide and phase-document baseline | PASS |
15-
| UI design intake, immutable-source manifest and design contract tests | PASS locally; CI pending for this phase |
15+
| UI design intake, immutable-source manifest and design contract tests | PASS in GitHub Actions run `30165905840` |
16+
| PHASE-002 shared UI foundation structural contracts | PASS locally — 8 tests |
17+
| PHASE-002 local Django, coverage and mailbox lint qualification | PASS — 195 passed, 1 skipped, 94.99% coverage |
1618
| Deterministic documentation index, manifest and change policy | PASS |
1719
| Complete AGPL-3.0 license text | PASS |
1820
| Source secret/private-data safety gate | PASS |
1921
| Python, JSON, YAML and shell syntax | PASS |
2022
| Django application tests and coverage | PASS |
21-
| Ruff and Bandit | PASS |
23+
| Ruff and Bandit | PASS for mailbox application; standalone contact-service gates added to final verifier and CI |
2224
| Django checks and migration drift | PASS |
2325
| Public contact-service tests | PASS |
2426
| Installer and operations contract tests | PASS |
@@ -92,16 +94,18 @@ See `FEATURE_MATRIX.md` for the feature-by-feature verification record.
9294
13. A root `documents/` baseline now provides maintained user, administrator and phase documentation.
9395
14. Deterministic synchronization, draft blocking and diff-based CI policy prevent maintained feature changes from merging without substantive documentation.
9496
15. The complete 25-image UI and logo archive is preserved with stable IDs, SHA-256 hashes, PNG structural validation, scope classification, and CI enforcement.
97+
16. PHASE-002 adds the frozen runtime design tokens, responsive authenticated and sign-in shells, local SVG assets, accessible navigation behavior, and focused UI contract gates without changing page business logic.
98+
17. Cross-platform verification now closes contact-service SQLite handles deterministically, preserves POSIX-only permission assertions, and subjects the standalone contact service to Ruff and Bandit in both the full forensic gate and CI.
9599

96100
## Automated evidence
97101

98-
- Django tests: **189 passed, 0 failed**
102+
- Django tests: **195 passed, 1 capability-based skip, 0 failed**
99103
- Application coverage: **94.99%**; minimum: **85%**
100104
- Ruff: **PASS**
101105
- Bandit: **PASS**
102106
- Django system check: **PASS**
103107
- Migration drift: **none**
104-
- Contact-service test program: **PASS**
108+
- Contact-service test program: **PASS**, including deterministic connection-close regression coverage
105109
- Deployment templates rendered: **13**, unresolved tokens: **0**
106110
- Installer plans: **2 valid and 9 invalid cases**, all passed
107111
- Backup/restore/health contracts: **PASS**
@@ -127,6 +131,16 @@ Web requests and Maildir ingestion remain separate services. Gunicorn worker/thr
127131

128132
The repository includes an SEO-oriented README, logo asset, release/download/license/platform/language/community badges, GitHub topics and description guidance, full license, notice, security policy, contribution guide, code of conduct, support policy, roadmap, issue/PR templates, CODEOWNERS, Dependabot, CI, release workflow, installation/build/development/operations/security documentation and Vib Tools ecosystem links.
129133

134+
135+
## PHASE-002 audit boundary
136+
137+
The phase changes only the shared base template, shared static foundation assets and JavaScript,
138+
focused tests, the contact-service connection-lifecycle helper, CI/audit tooling, generated
139+
inventories, and required documentation. It contains no model, migration, URL, form, permission,
140+
mail-flow, ingestion schema, deployment-template, or package change. Local dependency-backed tests
141+
and coverage passed; the final overwrite verifier must pass before commit, and GitHub Actions must
142+
pass before remote qualification.
143+
130144
## External acceptance gates
131145

132146
Before stable promotion:

0 commit comments

Comments
 (0)