cad90eb merutekan DATA melalui sendCommand() dengan readPoll state===1
yang selalu true — menyebabkan chunk lambat 5s/kirim saat ACK di-drop.
Kembalikan ke direct writeValueWithResponse + waitForAck.
Selama transfer aktif tidak ada idle gap (Qualcomm >8s), jadi ACK notify
tidak terpengaruh idle-drop.
Perubahan:
- sendCommandWithRetry: build payload sendiri, pakai chunkCRC param,
write+waitForAck langsung (tidak lewat sendCommand)
- sendCommand: hanya handle INIT dan END (DATA dihapus dari blok)
- Hapus writeSucceeded flag (tidak lagi dipakai)
- Hapus readPoll fallback untuk DATA
- Bump v12 (Footer + SW cache)
Akar masalah:
- 4a6ef8c menambah binary_parser_reset() di handler re-deploy SERIAL_BRIDGE
yang menghapus expected_total_crc setelah INIT — menyebabkan CRC mismatch
di END. Source 1d3a489 sudah menghapus reset-nya, tapi device butuh rebuild.
- cad90eb merutekan DATA melalui sendCommand() dengan readPoll state===1
yang selalu true saat DATA — write gagal dilaporkan sukses.
Perbaikan:
1. readPoll pintar untuk DATA: state===1 tidak lagi dianggap sukses.
readPoll hanya fast-fail di state>=5; deadline fallback hanya ok
jika writeValueWithResponse sukses (GATT write response = bukti delivery).
2. INIT_ACK_INDEX=0xFFFE (Fase 3): inisialisasi INIT dengan index unik
menghilangkan tabrakan dengan DATA[0] (index 0). binary_parser.c echo
index recv di ACK INIT. Guard handleFlashingNotification diperluas.
3. pendingAcks.clear() di awal deployHex mencegah poisoning antar deploy.
4. Track firmware inti ke git: binary_parser.c, checksum.c, stk500v1.c,
usb_host.c + headers + CMakeLists + sdkconfig + partitions.
Build: ESP-IDF v6, ESP32-S3, flash via /dev/ttyACM0
sendCommandWithRetry now delegates to sendCommand() instead of
using raw writeValueWithResponse + await ackPromise. This ensures
DATA chunks also benefit from the readValue() state poll fallback
when Android BLE notify is unreliable after idle.
Firmware (state_machine.c):
- Add EVENT_BLE_INIT handler to SERIAL_BRIDGE state
-> transition back to RECEIVING for re-deploy
- Add EVENT_BLE_INIT handler to ERROR states
-> allows re-deploy from error without pressing Retry
Frontend (ble-deployer.ts):
- Add readValue() state poll for INIT and DATA commands
(same Android notify idle-drop bug affects these too)
- INIT success: firmware state >= 1 (RECEIVING+)
- DATA success: firmware state == 1 (RECEIVING)
- Error on state >= 5
- Race ackPromise against a polling loop that yields to the event loop
every 200ms (vs a single blocking await that can miss notifications)
- bump SW cache v5→v6
and improve mobile UX
- Menambahkan fitur tombol \"Coba ▶\" untuk menyalin kode
materi ke editor secara otomatis.
- Implementasi setupTryButtons.ts (Svelte Action) untuk
injeksi tombol berdasarkan label bahasa Markdown (c, python,
`arduino).
- Mengatur perilaku tombol agar hanya memuat kode dan
memfokuskan tab (No Auto-Run) untuk memberikan kesempatan
siswa meninjau kode.
- Optimasi tampilan Mobile (< 768px):
- Tombol \"Coba\" selalu terlihat (tanpa hover).
- Otomatis membuka workspace ke mode 'half-sheet' dan
melakukan smooth scroll ke editor saat tombol diklik.
- Sinkronisasi urutan render: setupTryButtons dijalankan
sebelum highlightAllCode untuk memastikan deteksi bahasa
yang akurat.
- Update documentation.md dengan panduan penggunaan fitur
tombol \"Coba\" dan dokumentasi refactoring modularitas
halaman lesson.
- Menambahkan modul uji coba LaTeX ke daftar materi di
home.md
+page.svelte dan perbaiki backend parser
Pembaruan ini
mencakup:
- Refactoring skala besar pada halaman lesson SvelteKit untuk efisiensi kode.
- Ekstraksi evaluasi Code, Circuit, dan Velxio ke dalam direktori lib/services/.
- Memisahkan manajemen iframe (Zustand & PostMessage) ke velxio-manager.ts.
- Memisahkan Tab Panel HTML menjadi komponen spesifik (CodeTab, CircuitTab, VelxioTab).
- Ekstraksi blok <style> menjadi stylesheet terpisah (lesson.css).
- Perbaikan warning A11y & penghapusan class usang pada Navbar.svelte.
- Memperbaiki regex parser 'Available_Lessons' pada lesson_service.py di backend.
- Menambahkan mekanisme auto-append ekstensi '.md' untuk mengatasi bug Home kosong dan tombol 'Next Lesson' yang hilang akibat format URL baru di home.md.
3 - Integration of KaTeX in frontend (SvelteKit) with a custom
renderMath` action.
- Added `python-markdown-math` extension in backend (Flask). to handle math blocks.
- Configured Vite to handle KaTeX during SSR and browser rendering.
- Added a LaTeX test lesson and updated home navigation.
- Supported both inline ($) and block ($$) math rendering,
including multi-line support.
- Move navigation menu to the leftmost position and
consolidate actions into a dropdown.
- Replace clunky mobile sheet handle with explicit
minimize/maximize buttons.
- Fix home page content margins for list elements.
- Ensure student identity remains visible on mobile devices
with optimized font sizing.
- Synchronize CircuitJS simulator theme with global
light/dark mode.
- Update elemes.sh to provide cleaner output by silencing
podman-compose logs by default.
Implements multiple layers of security to address high-risk session
and authentication vulnerabilities identified in the security review:
- Allow code compilation (C, Python, Arduino) for anonymous users.
- Enforce a 1-request-per-2-minutes rate limit for anonymous IPs.
- Implement a global anonymous compilation queue with 20 concurrent slots.
- Proxy Velxio (Arduino) compilation through Flask to prevent API hijacking.
- Exempt authenticated users (tokens/cookies) from all rate limits.
- Fix networking and DNS resolution in podman-compose.
- Fix Svelte a11y warnings and trailing slash routing issues.
- Cookie Security: Added dynamic 'secure' flag support via COOKIE_SECURE
env variable for HTTPS/Tailscale Funnel compatibility.
- Rate Limiting: Integrated Flask-Limiter on /login (50 req/min) to
prevent API abuse while accommodating shared school networks (NAT).
- Tarpitting: Added 1.5s artificial delay on failed logins to neutralize
automated brute-force tools without blocking legitimate users.
- Session Invalidation: Implemented an in-memory token blacklist on
logout to ensure session tokens cannot be reused.
- Documentation: Updated technical docs and proposal status to reflect
the current security architecture.
Ref: @elemes/proposal.md (Poin 6.1, 6.2, 6.3)
- Create student tutorial documentation in Markdown with updated asset paths
- Add backend routes to serve rendered help content and assets via JSON API
- Implement frontend /help route using SvelteKit for professional rendering
- Add "Bantuan" link to the navigation bar with custom styling
- Generate tutorial screenshots and a demo video with virtual cursor and subtitles
- Configure Tailscale and Vite proxies to support the new help routing
- Add automated video generation scripts and assets
- Added CircuitJSApi interface for simulator API interaction.
- Updated lesson page to support circuit simulation alongside code execution.
- Implemented separate output states for code and circuit evaluations.
- Enhanced lesson content rendering to include circuit embeds using markdown.
- Refactored backend to process circuit embed syntax and convert to HTML.
- Updated podman-compose configuration to include new environment variable for cursor offset.
- Created a proposal document outlining the feasibility and implementation plan for CircuitJS1 integration.
- Added proxy handling for `/assets/` in `sinau-c-tail.json` to route requests to the asset server.
- Enhanced `hooks.server.ts` to support proxying for both `/api/*` and `/assets/*` endpoints, including handling binary content.
- Introduced an anti copy-paste system in the lesson page to prevent text selection and copying from lesson content.
- Updated `CodeEditor.svelte` to prevent pasting from external sources with multiple layers of protection.
- Improved lesson page structure to support floating editor functionality and mobile responsiveness.
- Added celebration overlay for successful code completion in the lesson page.
- Adjusted `vite.config.ts` to include asset proxy configuration.
- Modified `podman-compose.yml` for production deployment with gunicorn and updated network settings.