From 01f7c6658768d38d1aa30cbd97307ec98152c5ae Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:29:02 +0330 Subject: [PATCH 01/45] fix(deploy): route root installs to the protected public web entry --- .htaccess | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..88e21e3 --- /dev/null +++ b/.htaccess @@ -0,0 +1,22 @@ +Options -Indexes + + + RewriteEngine On + + # Keep repository metadata and secret dotfiles inaccessible. + RewriteRule (^|/)\.(?!well-known/) - [F,L] + + # An optional repository-root document root must never expose the source tree. + # Only the public assets are mapped directly; every application URL goes through PHP. + RewriteRule ^public(?:/|$) - [F,L,NC] + RewriteRule ^\.well-known/ - [END] + RewriteRule ^assets/(.*)$ public/assets/$1 [END,NC] + RewriteRule ^ public/index.php [QSA,END] + + + + Header always set X-Content-Type-Options "nosniff" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set X-Frame-Options "DENY" + Header always set Content-Security-Policy "default-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; object-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'self'" + From 87c7d51920da0e2ec1b5e1dae2abb1083bcefb2f Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:29:22 +0330 Subject: [PATCH 02/45] fix(assets): set explicit CSS and JavaScript MIME types --- public/.htaccess | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/.htaccess b/public/.htaccess index 26ca016..991bf0f 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -13,7 +13,16 @@ DirectoryIndex index.php RewriteRule ^ index.php [QSA,L] + + # Keep strict nosniff policies compatible with directly served static assets. + AddType text/css .css + AddType application/javascript .js + + + + Header set Cache-Control "public, max-age=31536000, immutable" + Header always set X-Content-Type-Options "nosniff" Header always set Referrer-Policy "strict-origin-when-cross-origin" Header always set X-Frame-Options "DENY" From 834245d49fb7a40d99974663fd495919b8c8d32b Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:29:24 +0330 Subject: [PATCH 03/45] test(ci): syntax-check the production workspace controller --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba2c4cc..81dbf4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - name: Check JavaScript syntax run: | node --check public/assets/js/ui.js - node --check public/assets/js/design-system-demo.js + node --check public/assets/js/workspace.js - name: Run MariaDB integration tests env: From f0cee4d28f692bff1ed0b71a8429db6431494cd9 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:29:27 +0330 Subject: [PATCH 04/45] fix(assets): invalidate stale workspace CSS and JavaScript caches --- public/app.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/app.html b/public/app.html index aea8d23..11f5bda 100644 --- a/public/app.html +++ b/public/app.html @@ -6,10 +6,10 @@ TeamCode Hub — Workspace - - - - + + + + From 11187deea78cd3b59459b8a73b652b925f1d5991 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:29:30 +0330 Subject: [PATCH 05/45] fix(styles): refresh design-system layer cache keys --- public/assets/css/app.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/assets/css/app.css b/public/assets/css/app.css index e556f68..c5afc62 100644 --- a/public/assets/css/app.css +++ b/public/assets/css/app.css @@ -5,12 +5,12 @@ Production pages should load this single stylesheet with a versioned URL. ========================================================================== */ -@import url("./tokens.css?v=0.2.1-dev"); -@import url("./base.css?v=0.2.1-dev"); -@import url("./layout.css?v=0.2.1-dev"); -@import url("./components.css?v=0.2.1-dev"); -@import url("./patterns.css?v=0.2.1-dev"); -@import url("./utilities.css?v=0.2.1-dev"); +@import url("./tokens.css?v=0.2.2-dev"); +@import url("./base.css?v=0.2.2-dev"); +@import url("./layout.css?v=0.2.2-dev"); +@import url("./components.css?v=0.2.2-dev"); +@import url("./patterns.css?v=0.2.2-dev"); +@import url("./utilities.css?v=0.2.2-dev"); /* Keep the document canvas consistent when pages use a full-height shell. */ body { background: var(--surface); color: var(--text); } From acbc4dde8fd67751d2900ae9a9872ded2457e7cf Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:30:46 +0330 Subject: [PATCH 06/45] test(styles): validate production asset wiring instead of showcase demo --- tests/design-system.php | 44 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/tests/design-system.php b/tests/design-system.php index 9fecfd5..cda862f 100644 --- a/tests/design-system.php +++ b/tests/design-system.php @@ -40,17 +40,17 @@ $patterns = $read('public/assets/css/patterns.css'); $utilities = $read('public/assets/css/utilities.css'); $uiScript = $read('public/assets/js/ui.js'); -$demoScript = $read('public/assets/js/design-system-demo.js'); -$demoPage = $read('public/design-system.html'); -$demoCss = $read('public/assets/css/design-system-demo.css'); +$workspaceHtml = $read('public/app.html'); +$workspaceCss = $read('public/assets/css/workspace.css'); +$workspaceScript = $read('public/assets/js/workspace.js'); $expectedImports = [ - '@import url("./tokens.css?v=0.2.1-dev");', - '@import url("./base.css?v=0.2.1-dev");', - '@import url("./layout.css?v=0.2.1-dev");', - '@import url("./components.css?v=0.2.1-dev");', - '@import url("./patterns.css?v=0.2.1-dev");', - '@import url("./utilities.css?v=0.2.1-dev");', + '@import url("./tokens.css?v=0.2.2-dev");', + '@import url("./base.css?v=0.2.2-dev");', + '@import url("./layout.css?v=0.2.2-dev");', + '@import url("./components.css?v=0.2.2-dev");', + '@import url("./patterns.css?v=0.2.2-dev");', + '@import url("./utilities.css?v=0.2.2-dev");', ]; $lastPosition = -1; foreach ($expectedImports as $import) { @@ -60,7 +60,7 @@ } $assert(str_contains($tokens, '--font-sans:') && str_contains($tokens, 'system-ui'), 'typography uses an installed system-font fallback stack'); -$assert(!preg_match('/fonts\.googleapis\.com|fonts\.gstatic\.com|use\.typekit\.net/i', $entry . $tokens . $base . $layout . $components . $patterns . $utilities . $demoCss), 'design-system CSS does not require a hosted font service'); +$assert(!preg_match('/fonts\.googleapis\.com|fonts\.gstatic\.com|use\.typekit\.net/i', $entry . $tokens . $base . $layout . $components . $patterns . $utilities), 'design-system CSS does not require a hosted font service'); $assert(str_contains($tokens, 'data-theme="dark"'), 'an explicit dark theme token set is available'); $assert(str_contains($base, 'prefers-reduced-motion: reduce'), 'base styles respect reduced-motion preferences'); $assert(str_contains($base, ':focus-visible'), 'keyboard focus indicators are defined'); @@ -75,12 +75,14 @@ $assert(str_contains($patterns, '.btn-xs') && str_contains($patterns, '.check .box') && str_contains($patterns, '.tabs.pill'), 'legacy button, form-state, and pill-tab aliases are available'); $assert(str_contains($uiScript, 'textContent = String(message'), 'toast content is inserted as text rather than interpreted HTML'); $assert(str_contains($uiScript, 'data-modal-open') && str_contains($uiScript, 'data-dropdown-toggle'), 'interaction controller includes modal and dropdown behavior'); -$assert(str_contains($demoPage, '/i', $demoPage), 'showcase HTML contains no inline JavaScript blocks'); -$assert(str_contains($demoPage, '/assets/css/design-system-demo.css') && str_contains($demoPage, '/assets/js/design-system-demo.js'), 'showcase-specific behavior and styles are external assets'); -$assert(str_contains($demoScript, 'window.TCHUI.notify'), 'showcase buttons use the shared notification API'); +$assert(str_contains($workspaceHtml, ')/i', $workspaceHtml), 'product shell contains no inline styles'); +$assert(!preg_match('/]*\\bsrc=)[^>]*>/i', $workspaceHtml), 'product shell contains no inline JavaScript'); +$assert(str_contains($workspaceCss, '.app-shell') && str_contains($workspaceCss, '.project-files-layout') && str_contains($workspaceCss, '.chat-messages'), 'product stylesheet covers actual workspace, source files, and chat views'); +$assert(str_contains($workspaceScript, '/api/teams') && str_contains($workspaceScript, '/api/projects/') && str_contains($workspaceScript, 'credentials: "same-origin"'), 'workspace controller connects team/project APIs with same-origin requests'); +$assert(str_contains($workspaceScript, '"X-Csrf-Token"') && str_contains($workspaceScript, 'function renderTeams'), 'workspace mutations retain CSRF protection and team rendering'); $assert(str_contains($tokens, '--text-muted: var(--g500);'), 'muted text uses a readable neutral on light surfaces'); $assert(str_contains($tokens, '--text-muted: #a1a1aa;'), 'muted text remains legible against dark surfaces'); @@ -92,14 +94,14 @@ $assert(is_file($root . '/' . $relativePath), 'entry stylesheet import resolves: ' . $relativePath); } -/* Verify the showcase references existing local CSS and JavaScript assets. */ -preg_match_all('/(?:href|src)="(\/assets\/[^"]+)"/', $demoPage, $assetMatches); +/* Verify the product shell references existing local CSS and JavaScript assets. */ +preg_match_all('/(?:href|src)="(\/assets\/[^"]+)"/', $workspaceHtml, $assetMatches); foreach ($assetMatches[1] as $assetUrl) { $relativePath = 'public' . strtok($assetUrl, '?'); - $assert(is_file($root . '/' . $relativePath), 'showcase asset URL resolves: ' . $relativePath); + $assert(is_file($root . '/' . $relativePath), 'product asset URL resolves: ' . $relativePath); } -$assert(str_contains($demoScript, 'demo-upload') && str_contains($demoScript, 'selectPage'), 'showcase upload preview and pagination examples are interactive'); -$assert(str_contains($demoScript, 'chip was removed locally'), 'showcase removable chips operate locally without a server request'); +$assert(str_contains($workspaceHtml, 'id="page-content"') && str_contains($workspaceHtml, 'id="application"'), 'workspace shell contains the actual app mount points'); +$assert(str_contains($workspaceScript, 'async function boot()') && str_contains($workspaceScript, 'window.TCHWorkspace'), 'workspace controller initializes and exposes its guarded controller'); echo "\n{$assertions} design-system assertions passed.\n"; From aa092474f6608349b71ec1e4cd9a00ea286409c5 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:31:30 +0330 Subject: [PATCH 07/45] test(ci): run workspace UI contract assertions in pull requests --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81dbf4e..2d87f5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,9 @@ jobs: - name: Check design-system assets run: php tests/design-system.php + - name: Check workspace UI contracts + run: php tests/workspace-ui.php + - name: Check JavaScript syntax run: | node --check public/assets/js/ui.js From c73e080bc647cff71cf3a22668c59b3d58b87565 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:31:33 +0330 Subject: [PATCH 08/45] test(workspace): cover root routing, asset MIME, cache policy, and CI wiring --- tests/workspace-ui.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/workspace-ui.php b/tests/workspace-ui.php index 859b69c..e4516b7 100644 --- a/tests/workspace-ui.php +++ b/tests/workspace-ui.php @@ -56,6 +56,7 @@ $projectFileMigration = $read('database/migrations/20261018000400_create_project_code_files.php'); $response = $read('app/Core/Response.php'); $workflow = $read('.github/workflows/ci.yml'); +$rootHtaccess = $read('.htaccess'); $htaccess = $read('public/.htaccess'); $assert(str_contains($html, ')/i', $html), 'workspace HTML contains no inline style blocks'); From ed4b3be808b78f9dd3b696c4e6f8b7f018c9f283 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:33:05 +0330 Subject: [PATCH 09/45] docs(styles): document the production design system without demo assets --- docs/DESIGN-SYSTEM.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/DESIGN-SYSTEM.md b/docs/DESIGN-SYSTEM.md index 5039cea..6046437 100644 --- a/docs/DESIGN-SYSTEM.md +++ b/docs/DESIGN-SYSTEM.md @@ -11,20 +11,20 @@ This document describes the shared visual and interaction foundation used by Tea | `public/assets/css/base.css` | Browser defaults, semantic element defaults, focus visibility, and reduced motion | | `public/assets/css/layout.css` | Containers, responsive grids, page shell, sidebar, and header layouts | | `public/assets/css/components.css` | Buttons, forms, badges, cards, alerts, tables, tabs, overlays, and feedback | -| `public/assets/css/patterns.css` | Upload/range controls, avatar states, pagination, accordions, tooltips, workflow steps, quote/code, and footer patterns | +| `public/assets/css/patterns.css` | Reusable upload/range controls, avatar states, pagination, accordions, tooltips, workflow steps, and content patterns | | `public/assets/css/utilities.css` | Small composable spacing, text, surface, and alignment helpers | -| `public/assets/js/ui.js` | Accessible interactions shared by product pages |\n| `public/assets/css/workspace.css` | Product-specific workspace, dashboard, project, task, and chat presentation |\n| `public/assets/js/workspace.js` | Authenticated API integration and workspace interactions |\n| `public/app.html` | English workspace shell and sign-in form | -| `public/assets/css/design-system-demo.css` | Styles unique to the reference showcase | -| `public/assets/js/design-system-demo.js` | Demo-only button handlers | -| `public/design-system.html` | English component reference page | +| `public/assets/css/workspace.css` | Product-specific workspace, dashboard, team, project, task, and chat presentation | +| `public/assets/js/ui.js` | Accessible interactions shared by product pages | +| `public/assets/js/workspace.js` | Authenticated API integration and workspace interactions | +| `public/app.html` | English workspace shell and sign-in form | ## Loading the design system Load the entry stylesheet and the shared UI controller from a page template. Keep product-specific styles and behavior in separate files and avoid inline style or script blocks. ```html - - + + ``` The entry stylesheet imports tokens, base rules, layout, core components, extended patterns, and utilities in dependency order. Every imported stylesheet URL carries a cache key. When CSS changes, bump the CSS asset query keys in the entry imports and HTML entry points together. A production release should use its actual SemVer version. @@ -85,14 +85,14 @@ Run: ```sh php tests/design-system.php node --check public/assets/js/ui.js -node --check public/assets/js/design-system-demo.js +node --check public/assets/js/workspace.js ``` CI runs these checks in addition to PHP lint, smoke tests, and MariaDB integration tests. These checks do not replace manual browser review, assistive-technology testing, or visual regression testing. ## Current scope -The showcase is a reference implementation of the style system, not a claim that the product dashboard, team/project screens, or chat interface are complete. Product screens must be built on the existing APIs and retain server-side authentication and authorization checks. +The shared style layers are loaded by the actual workspace shell; they are not a standalone product or a substitute for connected application behavior. Team, project, task, file, and chat actions must use the existing APIs and retain server-side authentication and authorization checks. ## Extended component coverage From c31213dce62ee732a7226999fdd6a411393f22a1 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:33:08 +0330 Subject: [PATCH 10/45] docs(workspace): document supported web roots and production-only UI --- docs/WORKSPACE-UI.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/WORKSPACE-UI.md b/docs/WORKSPACE-UI.md index 7ab1a7a..3d2a351 100644 --- a/docs/WORKSPACE-UI.md +++ b/docs/WORKSPACE-UI.md @@ -7,13 +7,14 @@ This document maps the English browser application to the existing server APIs. - `/` — authenticated workspace shell; shows sign-in when there is no active session. - `/login` — the same progressive-enhancement shell, initially displaying sign-in when unauthenticated. - `/verify-email` — the workspace shell used to confirm a one-time token supplied in the URL fragment. -- `/design-system.html` — component reference page. - `public/app.html` — semantic workspace shell. - `public/assets/css/app.css` and its token/base/layout/component/pattern/utility layers — shared design-system styles. - `public/assets/css/workspace.css` — product-only styles layered on the core design system. - `public/assets/js/workspace.js` — same-origin API client, navigation, rendering, forms, and chat polling. - `public/assets/js/ui.js` — shared design-system interactions. +The preferred deployment sets the document root to `public/`. A repository-root document root is also supported by the top-level `.htaccess`, which maps `/assets/*` to `public/assets/*`, routes application paths to `public/index.php`, and blocks direct access to the `public/` prefix and repository files. + Project repository links accept only public HTTPS GitHub URLs. The server shares one daily cached snapshot per repository and caps refresh attempts to 20 distinct repositories per UTC day. The HTML has no inline style or script blocks. The front controller returns HTML with a restrictive same-origin Content Security Policy. CSS and JavaScript are external, versioned files; update their query-string version when releasing a changed asset set. @@ -103,4 +104,4 @@ php tests/workspace-ui.php node --check public/assets/js/workspace.js ``` -These checks validate the static asset contract and JavaScript syntax. They do not replace manual browser testing across supported devices, keyboard-only interaction, screen-reader review, or visual regression tests. The design-system showcase includes extended input, avatar, chip, accordion, workflow-step, pagination, and content patterns. +These checks validate the static asset contract and JavaScript syntax. They do not replace manual browser testing across supported devices, keyboard-only interaction, screen-reader review, or visual regression tests. The style contract tests check actual production assets and route wiring; reusable patterns stay in the shared `patterns.css` layer instead of a separate demo page. From 2f0821f61ccbce856693afecfd95a579b4b83eed Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:33:11 +0330 Subject: [PATCH 11/45] docs(readme): align version and validation commands with production UI --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 99f907b..58d545a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TeamCode Hub -**Version:** 0.2.0-dev +**Version:** 0.2.1-dev **Status:** Active development TeamCode Hub is a modular, security-focused collaboration platform for software teams, designed for conventional PHP hosting with cPanel/DirectAdmin and MySQL/MariaDB. @@ -72,8 +72,8 @@ php tests/run.php php tests/design-system.php php tests/workspace-ui.php node --check public/assets/js/ui.js -node --check public/assets/js/design-system-demo.js node --check public/assets/js/workspace.js +php tests/workspace-ui.php ``` ## Remaining product work From 125a28125d6718b614002c8c4ecba1b1f740633f Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:33:14 +0330 Subject: [PATCH 12/45] docs(operations): explain safe root-document-root fallback --- docs/OPERATIONS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md index 314fa66..de7674b 100644 --- a/docs/OPERATIONS.md +++ b/docs/OPERATIONS.md @@ -3,6 +3,7 @@ ## Before deployment - Configure the document root to the repository's `public/` directory where possible. +- If the host cannot point its document root at `public/`, the repository-root `.htaccess` provides a locked-down fallback: it exposes only `/assets/*` from `public/assets/` and routes app paths through `public/index.php`. Do not disable the root rewrite rules, because they prevent direct access to repository source files. - Configure database environment variables through the host or a private configuration mechanism outside the web root. - Create a dedicated database user with only the permissions the application requires. - Enable HTTPS and configure session cookie security accordingly. If TLS terminates at a trusted reverse proxy, set `APP_HTTPS=true` only when the deployment topology guarantees HTTPS to the browser. From 5bcbd46172f7ae2b6a5d2c388efffa0d19cfedac Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:33:17 +0330 Subject: [PATCH 13/45] docs(changelog): record asset delivery and production UI cleanup --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8313304..a198616 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +- Fix CSS/JavaScript delivery for hosts whose document root is the repository root by routing `/assets/*` to the public asset directory without exposing application source files. +- Explicitly declare static CSS/JavaScript MIME types and apply immutable caching to versioned assets; bump workspace asset keys to avoid stale cached styles and scripts. +- Run the previously unwired workspace UI contract test in CI and syntax-check the production `workspace.js` controller. +- Remove the standalone visual showcase page and demo-only assets; retain shared design-system CSS that the live workspace uses. + + - Removed unused duplicate team/project settings handlers and aligned UI contract tests with the registered transactional update endpoints. - Add a project Files tab with a searchable private source-file directory, lightweight text editor, save/reload controls, and revision-history restore. From f63c4d38ada6e9d80560ae822b06e30993f888c2 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:33:45 +0330 Subject: [PATCH 14/45] refactor(ui): remove standalone visual showcase from product routes --- public/design-system.html | 324 -------------------------------------- 1 file changed, 324 deletions(-) delete mode 100644 public/design-system.html diff --git a/public/design-system.html b/public/design-system.html deleted file mode 100644 index 84ba265..0000000 --- a/public/design-system.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - - - - Design System — TeamCode Hub - - - - - - - - - - - - - - -
- - - - -
-
-

01 / Foundations

Color system

-

Neutral base · Semantic status colors

-
-
-

Primary

#0A0A0A

-

Muted surface

#F4F4F5

-

Success

#15803D

-

Danger

#B91C1C

-
- -
-

Type scale

System typography

-

No external font request

-
-
-

Display / 40px

Build better together.

-
-

Heading / 24px

Project activity

-
-

Body / 15px

Keep interface copy concise and actionable. Use spacing and contrast to establish hierarchy instead of adding unnecessary visual effects.

-
-

Caption / 12px

Updated a few moments ago · All times shown in UTC

-
-
- - -
-
-

02 / Components

Actions and states

-

Consistent sizing and focus behavior

-
- -
-
-

Button variants

-
- - - - - - -
-
-
-

Status badges

-
- DefaultDraft - CompletedPending - BlockedIn review -
-
-
-
Choose a short, recognizable name.
-
Status can be changed later.
-
-
-

Preferences

- - - - -
-
-
- -
-

Feedback

Alerts and notifications

-

Use the tone that matches the situation

-
-
-

Changes saved

Your project settings have been updated.

-

Review required

Two project members are waiting for approval.

- -
- - - -
-
-
- - -
-
-

03 / Patterns

Dashboard building blocks

-

Responsive and content-first

-
-
-

Active projects

12

+2 since last month

-

Open tasks

38

Across 4 teams

-

Pending reviews

04

Requires your attention

-
- -
-

Recent activity

A compact table pattern for project updates

-
- - - - - - - -
ProjectActivityStatusUpdated
Core APITask completedCompleted5 min ago
Web clientMember invitedPending28 min ago
DocumentationProject updatedIn review1 hour ago
-
-
Showing 3 of 12 activitiesDemo content only
-
- -
-
-

Release readiness

72%

In progress
-
-

Progress bars expose their value to assistive technology.

-
-
- -

No pinned projects yet

-

Pin a project to make it easier to find from your dashboard.

- -
-
- -
-

Tabbed content

Keyboard navigation with arrow keys, Home, and End

-
-
- - - -
-

Project overview

Summarize the goal, current status, and next milestone here.

- - -
-
- -
-
-

Input patterns

-

Upload and range

- -

The file input is local to this showcase and has no upload handler.

-
- - -

Native keyboard-operable range control with shared styling.

-
-
-
-

People and status

-

Avatars and chips

-
- AL - MK - JR -
-
- API team - Design review -
- -
-
- -
-
-

Disclosure

-

Accessible accordion

-
-
- What belongs in a design token? -
A reusable decision such as color, spacing, type scale, radius, elevation, or motion belongs in a central token set.
-
-
- Do these styles download fonts? -
No. The font stack uses system fonts already available on the visitor's device.
-
-
-
-
-

Progress and workflow

-

Status steps

-
-
Plan
- -
2Build
- -
3Ship
-
-
Release readiness72%
-
-
HealthyReviewBlocked
-
-
- -
-
-

Pagination

-

Bounded list navigation

-

Use pagination for large tables; prefer incremental cursors for live chat.

- -
-
-

Content pattern

-

Quote and code

-
-

Good interfaces make the next safe action obvious without hiding useful detail.

-
Product principle · Clarity before decoration
-
-

Use aria-live for dynamic status messages that need to be announced.

-
-
-
-
- - - - - -
- - -
- -
- - - From 8fc11cad120392b6baf834bd6f779073f2422cc7 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:33:48 +0330 Subject: [PATCH 15/45] refactor(styles): remove demo-only showcase stylesheet --- public/assets/css/design-system-demo.css | 25 ------------------------ 1 file changed, 25 deletions(-) delete mode 100644 public/assets/css/design-system-demo.css diff --git a/public/assets/css/design-system-demo.css b/public/assets/css/design-system-demo.css deleted file mode 100644 index de3df7c..0000000 --- a/public/assets/css/design-system-demo.css +++ /dev/null @@ -1,25 +0,0 @@ -/* ========================================================================== - TeamCode Hub Design System Showcase — Page-only styles - File: public/assets/css/design-system-demo.css - Purpose: Keep the reference page's layout details out of its HTML markup. - ========================================================================== */ - -.demo-principles { width: min(100%, 300px); } -.demo-swatch { height: 78px; } -.demo-swatch-primary { background: #0a0a0a; } -.demo-swatch-muted { background: #f4f4f5; } -.demo-swatch-success { background: #15803d; } -.demo-swatch-danger { background: #b91c1c; } -.demo-divider { margin-block: 4px; } -.demo-table-wrap { border: 0; border-radius: 0; } -.demo-foot-note { margin-inline-start: auto; } -.demo-tab-panel { padding-block: var(--space-4); } -.demo-tab-panel[hidden] { display: none; } - -@media (max-width: 720px) { - .demo-foot-note { margin-inline-start: 0; } -} - -/* Typography samples are classes rather than inline declarations, keeping markup clean. */ -.demo-type-display { font-size: clamp(2rem, 5vw, 2.5rem); letter-spacing: -.04em; } -.demo-type-heading { font-size: 24px; } From f380fab7904711fa26930ed2a2ab5c3f672a1d81 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:33:50 +0330 Subject: [PATCH 16/45] refactor(ui): remove demo-only showcase script --- public/assets/js/design-system-demo.js | 98 -------------------------- 1 file changed, 98 deletions(-) delete mode 100644 public/assets/js/design-system-demo.js diff --git a/public/assets/js/design-system-demo.js b/public/assets/js/design-system-demo.js deleted file mode 100644 index 8782624..0000000 --- a/public/assets/js/design-system-demo.js +++ /dev/null @@ -1,98 +0,0 @@ -/* ========================================================================== - TeamCode Hub Design System Showcase — Demo-only behavior - File: public/assets/js/design-system-demo.js - Purpose: Wire the reference page's sample buttons without inline JavaScript. - ========================================================================== */ - -(function () { - "use strict"; - - /* Do not fail silently if the main interaction controller is unavailable. */ - function initializeShowcase() { - const toastButton = document.getElementById("show-toast"); - const emptyAction = document.getElementById("empty-action"); - const year = document.getElementById("year"); - - if (toastButton) { - toastButton.addEventListener("click", function () { - if (window.TCHUI && typeof window.TCHUI.notify === "function") { - window.TCHUI.notify("This is a sample notification from the design system."); - } - }); - } - - if (emptyAction) { - emptyAction.addEventListener("click", function () { - if (window.TCHUI && typeof window.TCHUI.notify === "function") { - window.TCHUI.notify("The projects page will be connected when its UI is implemented."); - } - }); - } - - /* Keep removable chip examples interactive without touching application data. */ - document.querySelectorAll(".chip .x").forEach(function (button) { - button.addEventListener("click", function () { - const chip = button.closest(".chip"); - if (chip) chip.remove(); - if (window.TCHUI && typeof window.TCHUI.notify === "function") { - window.TCHUI.notify("The example chip was removed locally."); - } - }); - }); - - /* Make the showcase pager update its selected page and boundary states. */ - document.querySelectorAll(".pager").forEach(function (pager) { - const pageButtons = Array.from(pager.querySelectorAll("button")) - .filter(function (button) { - return !button.hasAttribute("aria-label") && /^\d+$/.test(button.textContent.trim()); - }); - const previous = pager.querySelector('[aria-label="Previous page"]'); - const next = pager.querySelector('[aria-label="Next page"]'); - - function selectPage(index) { - if (!pageButtons.length) return; - const boundedIndex = Math.max(0, Math.min(pageButtons.length - 1, index)); - pageButtons.forEach(function (button, buttonIndex) { - const selected = buttonIndex === boundedIndex; - button.classList.toggle("active", selected); - if (selected) button.setAttribute("aria-current", "page"); - else button.removeAttribute("aria-current"); - }); - if (previous) previous.disabled = boundedIndex === 0; - if (next) next.disabled = boundedIndex === pageButtons.length - 1; - } - - pageButtons.forEach(function (button, index) { - button.addEventListener("click", function () { selectPage(index); }); - }); - if (previous) previous.addEventListener("click", function () { - const activeIndex = pageButtons.findIndex(function (button) { return button.classList.contains("active"); }); - selectPage(activeIndex - 1); - }); - if (next) next.addEventListener("click", function () { - const activeIndex = pageButtons.findIndex(function (button) { return button.classList.contains("active"); }); - selectPage(activeIndex + 1); - }); - }); - - /* File selection is preview-only; no bytes leave the browser in this showcase. */ - const uploadInput = document.getElementById("demo-upload"); - if (uploadInput) { - uploadInput.addEventListener("change", function () { - const file = uploadInput.files && uploadInput.files[0]; - const dropzone = uploadInput.closest(".dropzone"); - const title = dropzone ? dropzone.querySelector("b") : null; - if (title && file) title.textContent = "Selected locally: " + file.name; - }); - } - - /* Keep the footer year accurate without embedding script in the HTML page. */ - if (year) year.textContent = String(new Date().getFullYear()); - } - - if (document.readyState === "loading") { - document.addEventListener("DOMContentLoaded", initializeShowcase, { once: true }); - } else { - initializeShowcase(); - } -})(); From 2a758b347355634fb341fa5650aaf408e2cc5609 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:36:40 +0330 Subject: [PATCH 17/45] fix(assets): correct the Apache static-file match expression --- public/.htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/.htaccess b/public/.htaccess index 991bf0f..1f2475e 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -20,7 +20,7 @@ DirectoryIndex index.php
- + Header set Cache-Control "public, max-age=31536000, immutable" Header always set X-Content-Type-Options "nosniff" From 57eae3470ad5a02b72a362f9c55f70fa73224f4f Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:40:45 +0330 Subject: [PATCH 18/45] fix(styles): define missing workspace design-token aliases --- public/assets/css/tokens.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/assets/css/tokens.css b/public/assets/css/tokens.css index eaca133..7ee0420 100644 --- a/public/assets/css/tokens.css +++ b/public/assets/css/tokens.css @@ -43,6 +43,13 @@ /* Keep secondary copy readable on white surfaces (WCAG AA contrast target). */ --text-muted: var(--g500); + /* Compatibility aliases used by product-level workspace components. */ + --text-primary: var(--text); + --surface-hover: var(--g100); + --surface-subtle: var(--surface-muted); + --surface-code: var(--surface-raised); + --radius-md: var(--r-lg); + /* Corner radii. */ --r-xs: 4px; --r-sm: 6px; From 80c8ad1f09ffe57df121492c6c73417136174408 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:40:49 +0330 Subject: [PATCH 19/45] test(styles): guard workspace token aliases against missing variables --- tests/design-system.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/design-system.php b/tests/design-system.php index cda862f..61a58ca 100644 --- a/tests/design-system.php +++ b/tests/design-system.php @@ -87,6 +87,10 @@ $assert(str_contains($tokens, '--text-muted: var(--g500);'), 'muted text uses a readable neutral on light surfaces'); $assert(str_contains($tokens, '--text-muted: #a1a1aa;'), 'muted text remains legible against dark surfaces'); +$assert(str_contains($tokens, '--text-primary: var(--text);'), 'workspace primary text alias resolves to the active theme text token'); +$assert(str_contains($tokens, '--surface-hover: var(--g100);') && str_contains($tokens, '--surface-subtle: var(--surface-muted);'), 'workspace hover and selected surfaces resolve from the active neutral palette'); +$assert(str_contains($tokens, '--surface-code: var(--surface-raised);') && str_contains($tokens, '--radius-md: var(--r-lg);'), 'source editor surface and legacy radius aliases are defined centrally'); + /* Verify every stylesheet imported by the entry point exists on disk. */ preg_match_all('/@import\s+url\("([^"]+)"\)/', $entry, $importMatches); foreach ($importMatches[1] as $importUrl) { From 3afa684b11a1ada690acdd11452d12ca38e54294 Mon Sep 17 00:00:00 2001 From: Elman Coder Date: Mon, 19 Oct 2026 19:41:34 +0330 Subject: [PATCH 20/45] fix(workspace): connect the team shortcut and remove the fake guide tile --- public/app.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/app.html b/public/app.html index 11f5bda..66f0c3a 100644 --- a/public/app.html +++ b/public/app.html @@ -171,11 +171,11 @@

Verify your email

-
+
+ Your teamsLoading teams… + +