From 8af84b424a9b13dc29308423cd2268bd8a208afb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hu=E1=BB=B3nh=20Th=C6=B0=C6=A1ng?=
<252359928+Huynhthuongg@users.noreply.github.com>
Date: Thu, 4 Jun 2026 20:45:10 +0700
Subject: [PATCH 1/6] Optimize RKIX3 mobile web interface
---
.github/workflows/hadolint.yml | 2 +-
.github/workflows/static.yml | 3 +
README.md | 26 ++-
index.html | 322 +++++++++++++++++++++++----------
scripts/smoke-test-static.mjs | 41 +++++
5 files changed, 293 insertions(+), 101 deletions(-)
create mode 100644 scripts/smoke-test-static.mjs
diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml
index dc73566..a264df3 100644
--- a/.github/workflows/hadolint.yml
+++ b/.github/workflows/hadolint.yml
@@ -2,7 +2,7 @@
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
-# hadoint is a Dockerfile linter written in Haskell
+# hadolint is a Dockerfile linter written in Haskell
# that helps you build best practice Docker images.
# More details at https://github.com/hadolint/hadolint
diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml
index 09631a2..8e55f57 100644
--- a/.github/workflows/static.yml
+++ b/.github/workflows/static.yml
@@ -22,6 +22,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
+ - name: Smoke test static app
+ run: node scripts/smoke-test-static.mjs
+
- name: Prepare static site
shell: bash
run: |
diff --git a/README.md b/README.md
index 91f1766..66293ea 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,7 @@
RKIX3/
├─ index.html # Single-file AI Studio UI
├─ README.md # Trang giới thiệu chuyên nghiệp trên GitHub
+├─ scripts/smoke-test-static.mjs # Smoke test HTML/JS trước khi deploy
├─ 1780136894650-Photoroom.png # Logo chính
└─ .github/workflows/static.yml # Build _site + deploy GitHub Pages
```
@@ -66,17 +67,26 @@ python3 -m http.server 4173
# mở http://127.0.0.1:4173
```
+## 🧪 Kiểm thử
+
+```bash
+node scripts/smoke-test-static.mjs
+```
+
+Smoke test sẽ kiểm tra cấu trúc route chính, sự tồn tại của chat input/send button, cú pháp JavaScript inline và guard chống render raw user message vào `innerHTML`.
+
## 🚀 Deploy GitHub Pages
-Workflow `.github/workflows/static.yml` sẽ:
+Workflow chính `.github/workflows/static.yml` sẽ:
1. Checkout source.
-2. Setup GitHub Pages.
-3. Tạo `_site` chứa `index.html`, ảnh và file đánh dấu static site.
-4. Upload artifact Pages.
-5. Deploy bằng `actions/deploy-pages`.
+2. Chạy smoke test static app bằng `node scripts/smoke-test-static.mjs`.
+3. Setup GitHub Pages.
+4. Tạo `_site` chứa `index.html`, ảnh và file đánh dấu static site.
+5. Upload artifact Pages.
+6. Deploy bằng `actions/deploy-pages`.
-> Nếu GitHub vẫn báo lỗi deploy, hãy vào **Settings → Pages → Build and deployment** và chọn **Source: GitHub Actions** cho repository.
+> Nếu GitHub vẫn báo lỗi deploy, hãy vào **Settings → Pages → Build and deployment** và chọn **Source: GitHub Actions** cho repository. Các workflow mẫu khác trong `.github/workflows/` chỉ nên được bật khi dự án thật sự dùng stack tương ứng.
## 🏅 Huy hiệu dự án
@@ -121,13 +131,13 @@ Workflow `.github/workflows/static.yml` sẽ:
## ✅ Ba xung đột đã được chốt
-- **Workflow Pages**: chỉ giữ một pipeline static ở `.github/workflows/static.yml`, dùng `_site` làm artifact triển khai.
+- **Workflow Pages**: `.github/workflows/static.yml` là pipeline deploy chính, chạy smoke test rồi dùng `_site` làm artifact triển khai.
- **Tài liệu GitHub**: README là trang giới thiệu chính thức của RKIX3, không còn nội dung cũ trùng lặp.
- **Web app RKIX3**: `index.html` tiếp tục là nguồn giao diện single-file được workflow copy trực tiếp khi deploy.
## 🗺️ Roadmap
-- [x] Giao diện RKIX3 Studio single-file.
+- [x] Giao diện RKIX3 Studio single-file, ưu tiên mobile web với shell giống app gốc.
- [x] Command Center cho CLI/mobile workflow.
- [x] Demo Offline để sinh blueprint khi chưa có API key.
- [x] GitHub Pages static deploy workflow.
diff --git a/index.html b/index.html
index 12bb580..3f12d05 100644
--- a/index.html
+++ b/index.html
@@ -1,118 +1,256 @@
-
+
- RKIX3 — Developer Workspace Platform
-
+ RKIX3 — Mobile AI Workspace
+
-
-
RKIX3 Command Layer
Dashboard
main · healthy
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Gần đây
+
+
Mobile AI shell
+
Build nhanh giao diện
+
+
+
+
+
diff --git a/scripts/smoke-test-static.mjs b/scripts/smoke-test-static.mjs
new file mode 100644
index 0000000..6b82bd4
--- /dev/null
+++ b/scripts/smoke-test-static.mjs
@@ -0,0 +1,41 @@
+import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join } from 'node:path';
+import { spawnSync } from 'node:child_process';
+
+const html = readFileSync('index.html', 'utf8');
+const failures = [];
+
+function assert(condition, message) {
+ if (!condition) failures.push(message);
+}
+
+assert(html.includes(''), 'index.html must declare an HTML doctype.');
+assert(html.includes('${m.text}'), 'Chat messages must not render raw user text into innerHTML.');
+
+const scripts = [...html.matchAll(/
diff --git a/scripts/smoke-test-static.mjs b/scripts/smoke-test-static.mjs
index 6b82bd4..8a14429 100644
--- a/scripts/smoke-test-static.mjs
+++ b/scripts/smoke-test-static.mjs
@@ -13,6 +13,10 @@ function assert(condition, message) {
assert(html.includes(''), 'index.html must declare an HTML doctype.');
assert(html.includes('
Date: Thu, 4 Jun 2026 21:04:02 +0700
Subject: [PATCH 3/6] Update index.html
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Signed-off-by: Huỳnh Thương <252359928+Huynhthuongg@users.noreply.github.com>
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index a81cb46..245ecd2 100644
--- a/index.html
+++ b/index.html
@@ -247,7 +247,7 @@
const quick=[['code','Lập trình','Viết code, debug và tối ưu',icons.code],['workspace','Build','Xây dựng sản phẩm nhanh chóng',icons.cube],['profile','Tự động hoá','Tự động hoá quy trình và công việc',icons.gear],['ai','AI thông minh','Hỗ trợ bởi AI thế hệ mới',icons.bot]];
const entities={messages:[{role:'agent',text:'RKIX3 đã sẵn sàng. Hỏi bất kỳ điều gì để bắt đầu build.'}],projects:[['Nebula Console','Đang build','76%'],['AgentOps CLI','Lên kế hoạch','42%'],['Docs Pulse','Review','88%']]};
function navHTML(){return routes.map(r=>``).join('')}
-function drawerHTML(){return [['ai','Đoạn chat mới',icons.code],['home','Tìm kiếm đoạn chat',icons.menu],['code','Thư viện',icons.library],['workspace','Dự án',icons.folder],['profile','Ứng dụng',icons.apps]].map(r=>``).join('')}
+function drawerHTML(){return [['home','Đoạn chat mới',icons.code],['home','Tìm kiếm đoạn chat',icons.menu],['code','Thư viện',icons.library],['workspace','Dự án',icons.folder],['profile','Ứng dụng',icons.apps]].map(r=>``).join('')}
function renderChat(){$('#chatLog').innerHTML=entities.messages.map(m=>`
${esc(m.text)}
`).join('')}
function renderHome(){$('#home').innerHTML=`
Chúng ta nên bắt đầu từ đâu?
Lập trình · Code · Build · Tự động hoá trên một giao diện mobile gọn, sáng và nhanh.
${quick.map(q=>``).join('')}
`;renderChat()}
function renderAI(){$('#ai').innerHTML=`
AI thông minh
Online
Tập trung cho mobile trước: prompt nhanh, nút mỏng, icon xanh và layout giống app RKIX3 ban đầu.