Skip to content

Latest commit

 

History

History
106 lines (68 loc) · 5.09 KB

File metadata and controls

106 lines (68 loc) · 5.09 KB

byte_code_app

The mobile client for the ByteCode platform — task review, notifications and project memory in your pocket. Humans plan and approve anywhere, anytime; agents execute online.

中文 | English

Flutter Platform

ByteCode is an AI-native project management platform (the hub for data, memory and governance). This repo is its Flutter mobile client: it talks to the platform REST API and serves the human side of the workflow on the go — review work, track tasks, catch notifications, switch environments.

Related Repositories

  • byte-code — the AI-native project management platform (Go backend + Vue web app)
  • byte-code-cli — command-line client for the platform

Screenshots

Captured on a real device (Android 13):

Login Workbench Tasks Task Detail
Login Workbench Tasks Task Detail
Review Notifications Me Server Switch
Review Notifications Me Server Switch

Features

Multiple server instances

  • One-tap switching across dev / staging / prod environments; addresses and remarks stay on-device only
  • Tokens are bound to their instance: switching handles the login state automatically (log out when switching away, auto-resume a valid session when switching back)

Full task picture

  • Workbench dashboard: four-tile stats (in progress / blocked / pending review / open), reviews awaiting you, your tasks, project memory
  • Task list with six-state filters + keyword search + quick create
  • Task detail: description / artifacts / step checklist (checking a step counts as progress) / execution log / comments; claim, complete, block and unblock

Human review workbench

  • Agent-submitted tasks queue up for review with artifacts and completed checklist at a glance
  • Approve / reject (rejection requires a reason); the result automatically notifies the executor

Notification center

  • All / unread filters, type-colored icons, tap to mark read, mark all read, unread badge

Project switching

  • One tap to switch projects; every page refreshes accordingly

Quick Start

Prerequisites: a running byte-code backend (default http://<host>:8000, admin admin/admin123, change on first login) and Flutter 3.47+.

flutter pub get
flutter run                        # pick a connected device/emulator
flutter analyze && flutter test    # 15 unit & widget tests

Add your backend address under "Server Management" in the app, then sign in.

Debugging against a local backend over USB

When the backend runs in local Docker (localhost:8000), reverse the port for the phone:

adb reverse tcp:8000 tcp:8000
# Add localhost:8000 in the app's server management;
# or use <pc-ip>:8000 directly on the same LAN

Cleartext HTTP is enabled (usesCleartextTraffic).

Packaging & Release

./scripts/build-apk.sh             # one-command local build -> dist/byte_code_app_v<version>.apk
                                   # Version defaults to the latest git tag (0.0.1 if none), or pass one explicitly

CI release (tag-driven, same mechanism as byte-code): run Tag Release from the Actions page (the version is derived from commit semantics: any feat → minor, only fix/chore → patch). Pushing the tag runs the analyze + test gate → builds a release APK (version injected via --build-name, pubspec untouched) → generates a categorized Chinese changelog → creates a GitHub Release. See .github/workflows/.

The release build is currently signed with the debug key (installable, not suitable for public distribution); configure a release keystore in build.gradle.kts before formal distribution.

Tech Stack & Architecture

Flutter 3.47 / Dart 3, dio + provider + shared_preferences, zero native plugins.

lib/
├── main.dart            # Entry: session init + login guard (token bound to server instance)
├── core/
│   ├── ui.dart          # Design tokens (#16a34a theme shared with the web app), StatusTag, etc.
│   ├── session.dart     # Global session: server instances / token / current project / user (persisted)
│   └── api.dart         # dio client: {code,message,data} unwrapping, 401 handling, friendly errors
├── models/models.dart   # Task / Project / Memory / Notification / Comment entities
└── pages/               # 9 screens: login / server / home_shell (5 tabs) / work / tasks /
                         #            task_detail / review / notify / me / projects