Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
b83dd5e
First fingerprint lock offer fix, added Firebase debugging options.
jsfraz Sep 29, 2025
2064169
Enhanced fingerprint settings.
jsfraz Sep 29, 2025
fd66052
Update README
jsfraz Jan 18, 2026
12a2f45
Updated packages, added Linux target
jsfraz Mar 31, 2026
d43c02d
Upgrade Android Gradle plugin, configure Java home, and update projec…
jsfraz May 5, 2026
0fbb429
Anhance QR code scanning logic in scan_invite_page.dart
jsfraz Jun 3, 2026
debe0cb
Media test
jsfraz Jun 3, 2026
021c646
TODO
jsfraz Jun 3, 2026
9e45332
More TODOs
jsfraz Jun 3, 2026
2a20a51
Merge pull request #7 from jsfraz/media
jsfraz Nov 10, 2026
fc85663
Updated packages
jsfraz Nov 10, 2026
e38f319
chore(ci): add Flutter CI and agent rules
jsfraz Nov 11, 2026
20ebddf
docs: drop the TODO list from the README
jsfraz Nov 11, 2026
5b2539f
feat: phase 2 (Linux desktop E2E)
jsfraz Nov 11, 2026
2304e42
docs: add phase 3 ADRs
jsfraz Nov 11, 2026
28f9f42
docs: keep ADRs within the 15-line limit
jsfraz Nov 11, 2026
0c5a3b9
chore(android): upgrade toolchain to AGP 9.5.1 and Gradle 9.9.1
jsfraz Nov 12, 2026
5881e82
feat(mcp): wire Dart/Flutter MCP tooling for agent workflows
jsfraz Nov 12, 2026
922f79b
chore(deps): upgrade resolvable packages within current constraints
jsfraz Nov 12, 2026
a519145
fix(push): register with FCM and use the FID from onRegistered
jsfraz Nov 12, 2026
9c4bc73
fix(push): enable FID registration on Android
jsfraz Nov 12, 2026
dd33bc6
fix(notifications): deliver FCM pushes through the app's channel
jsfraz Nov 12, 2026
49b6335
fix(notifications): use a monochrome status-bar icon
jsfraz Nov 12, 2026
6dceba3
feat(chat): per-chat theme override
jsfraz Nov 12, 2026
9657ec4
feat(chat): theme Chat Info with the per-chat color
jsfraz Nov 12, 2026
f974a6e
feat(chat): shared media grid in Chat Info
jsfraz Nov 12, 2026
9d65a7f
feat(chat): KLIPY GIF picker and keyboard GIF insertion
jsfraz Nov 12, 2026
148f183
revert(chat): drop the KLIPY picker, GIFs come from the keyboard only
jsfraz Nov 12, 2026
0c91f6a
fix(media): scale the image/GIF viewer to the full screen
jsfraz Nov 12, 2026
3d1fb93
feat(settings): change the local password
jsfraz Nov 12, 2026
96b51a0
feat(crypto): random PBKDF2 salt with a one-time migration
jsfraz Nov 12, 2026
d6fd637
feat(notifications): open the chat on tap and extend the notification…
jsfraz Nov 12, 2026
3489889
feat(chat): long-press message actions
jsfraz Nov 12, 2026
83a4c5e
feat(chat): same icons in the attachment viewer menu as in the bubble…
jsfraz Nov 13, 2026
9cbbe11
feat(media): swipe between a conversation's attachments in the viewer
jsfraz Nov 13, 2026
f619830
feat(chat): open Chat Info from the header avatar and name
jsfraz Nov 13, 2026
01c2c1f
feat(chat): send and open any file type
jsfraz Nov 13, 2026
3c92524
test(chat): document bubble rendering
jsfraz Nov 13, 2026
01aff95
fix(media): show the real file size on received attachments
jsfraz Nov 13, 2026
8b48787
feat(media): icons by document type, no text preview
jsfraz Nov 13, 2026
c3d7e32
feat(media): theme the attachment viewer
jsfraz Nov 13, 2026
3cec03e
feat(chat): chat color in the chat color picker and the attachment vi…
jsfraz Nov 13, 2026
774e71f
feat: user ids are UUID strings
jsfraz Nov 13, 2026
d52bf15
feat(android,ios): release signing hook, permission parity, version p…
jsfraz Nov 13, 2026
484ce20
feat(media): album messages, video thumbnails, upload size guard
jsfraz Nov 13, 2026
fdac3b9
feat(chat): sending state, bottom-anchored paged list, stoppable voice
jsfraz Nov 13, 2026
db03ffc
fix(chat): let the caption sheet own its TextEditingController
jsfraz Nov 13, 2026
5434bb2
fix(media): video thumbnails in Chat Info, smaller play badge, captio…
jsfraz Nov 13, 2026
d99ee4a
fix(media): shrink the play badge on video bubbles
jsfraz Nov 13, 2026
68fd901
fix(media): keep the video play badge at its intrinsic size
jsfraz Nov 13, 2026
b4f298a
fix(media): make the video play badge a bit larger
jsfraz Nov 13, 2026
de9d86e
feat(search): rework user search page
jsfraz Nov 15, 2026
d770053
fix(media): own caption controller, smaller play badge, chat info thu…
jsfraz Nov 15, 2026
9d9377a
fix(settings): drop the danger zone heading
jsfraz Nov 15, 2026
20fdb5d
fix(chat): drop the server echo of self-sent messages
jsfraz Nov 15, 2026
9f748d5
feat(admin): rework the server users and invites card
jsfraz Nov 15, 2026
38b2b7e
feat(media): playback speed and a single-player lock for voice messages
jsfraz Nov 15, 2026
26f7795
feat(chat): linkify URLs in message text
jsfraz Nov 15, 2026
0b964f5
fix(chat): drop emoji prefixes from attachment previews
jsfraz Nov 15, 2026
b3cdc39
perf(nav): snappy, consistent view transitions
jsfraz Nov 15, 2026
25bed6b
perf(media): batch decryption, throttled decrypts, lazy chat info grid
jsfraz Nov 15, 2026
1becd38
fix: acknowledged delivery, per-message cache and auth recovery
jsfraz Nov 15, 2026
7846e6f
fix(security): no plaintext temp media, HTTPS only, notification prev…
jsfraz Nov 15, 2026
07a0734
fix(auth): treat a token without a type claim as unusable
jsfraz Nov 15, 2026
47b5600
fix(http): give every api client a timeout
jsfraz Nov 15, 2026
5c642df
feat(i18n): translate server error codes
jsfraz Nov 15, 2026
33719c6
feat(chat): paint the conversation with its own color
jsfraz Nov 15, 2026
1a46539
feat(chat): doodle background and chat-colored input bar
jsfraz Nov 16, 2026
304e75f
Add resend action for failed messages
jsfraz Nov 17, 2026
75dd859
fix(chat): clear the unread row when the chat is opened
jsfraz Nov 17, 2026
a40e781
feat: F1 foundations - device registry, archive sync and history
jsfraz Nov 17, 2026
784b7a3
fix(ws): keep a refused reconnect silent
jsfraz Nov 17, 2026
c1713ad
fix(sync): move the delta cursor only on global batches
jsfraz Nov 17, 2026
edef007
chore(deps): resolve the lock against the pinned client tags
jsfraz Nov 17, 2026
13c44dd
UI improvements
jsfraz Nov 17, 2026
970679d
Retention dialog fix
jsfraz Nov 17, 2026
be4a5a6
feat: F2 chat UX - rendering, navigation and chat list
jsfraz Nov 17, 2026
6c92665
feat: F2b chat search, jump to date and chat list filters
jsfraz Nov 17, 2026
fe3f2df
refactor(search): search only inside a conversation
jsfraz Nov 17, 2026
48509cc
fix(chat): keep the header to the info button
jsfraz Nov 17, 2026
fe8281e
feat(search): avatar and a language-aware date on each hit
jsfraz Nov 17, 2026
029c065
fix(chat): make a search hit actually scroll into view
jsfraz Nov 17, 2026
8ff3fff
fix(chat): let an attachment fill its bubble
jsfraz Nov 17, 2026
61190f6
fix(media): stop re-downloading attachments the device already holds
jsfraz Nov 17, 2026
76d56f2
fix(voice): keep the track centred while the speed label is shown
jsfraz Nov 17, 2026
82003ee
fix(media): open the attachment that was tapped
jsfraz Nov 17, 2026
1043485
fix(ui): keep content out from under the translucent app bar
jsfraz Nov 17, 2026
eddb74e
chore: drop a stale TODO in main
jsfraz Nov 18, 2026
76e39d3
fix(chat): land on the newest message when the chat opens
jsfraz Nov 18, 2026
4525b1a
Commitni a pushni
jsfraz Nov 18, 2026
ad9bace
feat(chat): delete a chat or a message for the whole account
jsfraz Nov 18, 2026
668dd65
fix(chat): delete an own message right after sending
jsfraz Nov 18, 2026
69bd174
feat(chat): edit, react and pin messages
jsfraz Nov 19, 2026
f4fe5ab
feat(chat): forwarded label, read receipts and seen ticks
jsfraz Nov 19, 2026
f126e2c
fix(chat): let the edit dialog own its controller
jsfraz Nov 19, 2026
73cc686
feat(chat): pin reactions to the bubble as one bottom badge
jsfraz Nov 19, 2026
4029483
feat(chat): double-tap reacts instead of quoting
jsfraz Nov 19, 2026
0065f75
feat(chat): edit an attachment caption, badge on the media corner
jsfraz Nov 19, 2026
b4a5d56
fix(chat): keep the attachment reaction badge off the corner curve
jsfraz Nov 19, 2026
181ed59
fix(chat): drop the attachment badge to the bottom edge
jsfraz Nov 19, 2026
1c04daa
fix(chat): let the attachment badge straddle the media's bottom edge
jsfraz Nov 19, 2026
c0a20ef
fix(chat): keep the caption off the hanging badge
jsfraz Nov 19, 2026
03128c9
feat(chat): attach inside the input, messages under the composer
jsfraz Nov 19, 2026
57cc09b
fix(chat): transparent composer bar
jsfraz Nov 19, 2026
c3421ca
fix(chat): repaint read ticks without a new message
jsfraz Nov 19, 2026
75343b8
fix(chat): keep the read receipts row enabled and un-spammable
jsfraz Nov 19, 2026
49cb0ff
feat(chat): move the pin strip under the header and slim it down
jsfraz Nov 19, 2026
184e891
fix(chat): keep the read cursor in microseconds
jsfraz Nov 20, 2026
08f42ab
fix(chat): lift the composer above the keyboard
jsfraz Nov 20, 2026
304bb3a
feat(chat): show the peer's read tick in the chat list
jsfraz Nov 20, 2026
81aa642
fix(chat): draw the reaction badge on voice and file bubbles
jsfraz Nov 20, 2026
17f5285
fix(chat): reach a pin that is far from the viewport, and walk the pins
jsfraz Nov 20, 2026
0753340
feat(chat): jump to a pinned message from chat info, and flash the ta…
jsfraz Nov 20, 2026
45adaf3
perf(media): stop re-decrypting attachments and decode them tile-sized
jsfraz Nov 20, 2026
54bcc48
fix(chat): stop a reaction from re-mounting the attachment
jsfraz Nov 20, 2026
3b95ec7
feat(settings): redesign the theme dialog
jsfraz Nov 20, 2026
0f84cf7
feat(chat): give the chat theme the same picker as the app theme
jsfraz Nov 20, 2026
5c81ef0
feat(chat): show who reacted, and mark your own pick in the reaction row
jsfraz Nov 20, 2026
f175ab8
fix(chat): give reactions back the tap the badge used to offer
jsfraz Nov 20, 2026
d8dd15d
fix(home): let the chat list run under the folder chips
jsfraz Nov 20, 2026
009927e
feat(chat): typing indicator and presence, both off by default
jsfraz Nov 21, 2026
55dea96
feat(chat): disappearing messages, view-once media and screenshot war…
jsfraz Nov 21, 2026
25d1f9f
feat(chat): static and live location
jsfraz Nov 21, 2026
46a792d
fix(chat): a disappearing-message control message raises no unread ba…
jsfraz Nov 21, 2026
5d2d429
feat(app): keep view-once messages as tombstones and hide their conte…
jsfraz Nov 22, 2026
9381942
feat(app): block and detect screenshots through our own platform channel
jsfraz Nov 22, 2026
cb751d2
feat(app): view-once albums, files and locations, and tombstones for …
jsfraz Nov 22, 2026
46323bb
feat(app): typing dots and live location as a normal chat bubble
jsfraz Nov 22, 2026
a644f1c
feat(chat): keep a jump-to-latest button while scrolled up
jsfraz Nov 22, 2026
1fddd2a
fix(cache): find a stored message by its millisecond, not microsecond…
jsfraz Nov 22, 2026
67693ce
feat(chat): move shared media to a page of its own
jsfraz Nov 22, 2026
5096380
fix(chat): show a send in progress whatever the composer holds
jsfraz Nov 22, 2026
f4fe150
fix(chat): draw the new-messages divider in the chat color
jsfraz Nov 22, 2026
49ecf14
fix(chat): keep the picked color in the chat theme dialog
jsfraz Nov 22, 2026
30f800f
feat(app): send attachments in resumable chunks with a 100 MiB limit
jsfraz Nov 22, 2026
958eed9
feat(app): storage screen with per-chat usage and auto-delete
jsfraz Nov 22, 2026
25018f3
feat(app): voice waveform, hands-free lock and playback of the next v…
jsfraz Nov 22, 2026
f888468
feat(app): download attachments by network type with a manual fallback
jsfraz Nov 22, 2026
f3f506b
feat(app): edit a photo or trim a video before sending it
jsfraz Nov 22, 2026
b652df5
feat(app): custom stickers imported from a file
jsfraz Nov 22, 2026
2811bca
feat(app): share to another app and receive Android shares
jsfraz Nov 22, 2026
1a6d29b
feat(app): record and send a round video note
jsfraz Nov 22, 2026
9c3eee9
fix(app): keep the pencil icon for the draw action
jsfraz Nov 22, 2026
c322877
fix(app): draw image strokes in the picture's own box
jsfraz Nov 22, 2026
f9a7fb2
feat(app): choose the drawing colour in the image editor
jsfraz Nov 22, 2026
61be31a
fix(app): hide view-once content from previews and drop emojis from them
jsfraz Nov 22, 2026
e150f43
fix(app): preview a location without the pin, keep emojis elsewhere
jsfraz Nov 22, 2026
9b6c0df
fix(app): rebuild the video trim screen around the picture
jsfraz Nov 22, 2026
6fe3a23
feat(app): paperclip composer with a chat-coloured mic beside it
jsfraz Nov 23, 2026
b95e2fc
fix(app): align the mic button with the composer field
jsfraz Nov 23, 2026
3e6580a
feat(app): camera button in the composer with photo, video and round …
jsfraz Nov 23, 2026
48f690d
fix(app): fill the camera preview and follow the device orientation
jsfraz Nov 23, 2026
d36663e
fix(app): move the camera shutter to the right when turned
jsfraz Nov 23, 2026
18bc411
fix(app): shrink the recording stop square in the camera shutter
jsfraz Nov 23, 2026
2d3b1c5
fix(app): read video rotation from the container so portrait clips st…
jsfraz Nov 23, 2026
e2a7d11
fix(app): trust the player's rotated video size instead of rotating a…
jsfraz Nov 23, 2026
612621d
fix(app): colour an opened view-once bubble by its owner
jsfraz Nov 23, 2026
6bdc40b
fix(app): carry the chat colour into everything opened from chat info
jsfraz Nov 23, 2026
a90e8e1
fix(app): start a round note from the composer camera button
jsfraz Nov 23, 2026
19eeaea
fix(app): keep the camera button in the composer and start notes from it
jsfraz Nov 23, 2026
42e1ad8
fix(app): keep an opened view-once frame opaque
jsfraz Nov 23, 2026
a146c0c
fix(app): draw a round note as a circle while it is still sending
jsfraz Nov 23, 2026
9cb8804
fix(app): fold the voice waveform into fewer, visible bars
jsfraz Nov 23, 2026
5552647
fix(app): stop the voice chain at our own message
jsfraz Nov 23, 2026
87cacf0
fix(app): keep the keyboard down when a chat sheet or camera closes
jsfraz Nov 23, 2026
6c62915
feat(app): move the attach and camera buttons beside the composer
jsfraz Nov 23, 2026
72b741a
fix(app): compact the composer icons so the field keeps its width
jsfraz Nov 23, 2026
ed7f86f
feat(app): put the attach and camera icons back inside the composer f…
jsfraz Nov 23, 2026
f779bac
fix(app): keep the composer icons out of the field's tap region
jsfraz Nov 23, 2026
52adacf
fix(app): do not open the camera when a round note is released
jsfraz Nov 23, 2026
03ed944
feat(app): show the round note's minute as a filling ring
jsfraz Nov 23, 2026
e09d2db
feat(app): play a round note inline with a progress ring and its time
jsfraz Nov 23, 2026
391188d
style(app): format the chat bubble after the media changes
jsfraz Nov 23, 2026
8b6bbbf
fix(app): start the share inbox after unlock and accept shared links
jsfraz Nov 23, 2026
5ddb91b
docs(app): note the memory ceiling of a whole-file chunked upload
jsfraz Nov 23, 2026
52f2401
feat(app): autoplay round notes like voice messages
jsfraz Nov 23, 2026
8dd25d8
feat(app): keep a round note playing in a pinned copy
jsfraz Nov 24, 2026
d734ce3
refactor(app): rename whisper to shept
jsfraz Nov 26, 2026
533c823
chore(app): retire firebase dependencies, keep the code commented
jsfraz Nov 26, 2026
e678fa2
ci(app): drop the Firebase options step
jsfraz Nov 26, 2026
9f3cecf
style(app): format the renamed media helper
jsfraz Nov 26, 2026
5a2c574
docs(app): mark Firebase as retired
jsfraz Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: pub
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5

- package-ecosystem: gradle
directory: /android
schedule:
interval: monthly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
73 changes: 43 additions & 30 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ on:
- main

jobs:
e2e:
uses: ./.github/workflows/flutter-e2e.yml

build:
needs: e2e
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -30,36 +34,45 @@ jobs:
- name: Get dependencies
run: flutter pub get

# Creating Firebase configuration files from base64 encoded secret keys
- name: Create Firebase configuration files
# # Creating Firebase configuration files from base64 encoded secret keys
# - name: Create Firebase configuration files
# run: |
# if [ -n "${{ secrets.FIREBASE_JSON_BASE64 }}" ]; then
# echo "${{ secrets.FIREBASE_JSON_BASE64 }}" | base64 -d > firebase.json
# else
# echo "Error: FIREBASE_JSON_BASE64 secret is required"
# exit 1
# fi
#
# if [ -n "${{ secrets.FIREBASE_OPTIONS_DART_BASE64 }}" ]; then
# echo "${{ secrets.FIREBASE_OPTIONS_DART_BASE64 }}" | base64 -d > lib/firebase_options.dart
# else
# echo "Error: FIREBASE_OPTIONS_DART_BASE64 secret is required"
# exit 1
# fi
#
# if [ -n "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" ]; then
# echo "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 -d > android/app/google-services.json
# else
# echo "Error: GOOGLE_SERVICES_JSON_BASE64 secret is required"
# exit 1
# fi
#
# # if [ -n "${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}" ]; then
# # echo "${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}" | base64 -d > ios/Runner/GoogleService-Info.plist
# #else
# # echo "Error: GOOGLE_SERVICE_INFO_PLIST_BASE64 secret is required"
# # exit 1
# #fi

# Fail fast when the version was not bumped for this release
- name: Check version bump
run: |
if [ -n "${{ secrets.FIREBASE_JSON_BASE64 }}" ]; then
echo "${{ secrets.FIREBASE_JSON_BASE64 }}" | base64 -d > firebase.json
else
echo "Error: FIREBASE_JSON_BASE64 secret is required"
exit 1
fi

if [ -n "${{ secrets.FIREBASE_OPTIONS_DART_BASE64 }}" ]; then
echo "${{ secrets.FIREBASE_OPTIONS_DART_BASE64 }}" | base64 -d > lib/firebase_options.dart
else
echo "Error: FIREBASE_OPTIONS_DART_BASE64 secret is required"
exit 1
fi

if [ -n "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" ]; then
echo "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 -d > android/app/google-services.json
else
echo "Error: GOOGLE_SERVICES_JSON_BASE64 secret is required"
VERSION=$(grep 'version:' pubspec.yaml | sed 's/version: //' | cut -d+ -f1 | tr -d '[:space:]')
if git rev-parse -q --verify "refs/tags/v$VERSION" >/dev/null; then
echo "::error::v$VERSION is already released, bump version in pubspec.yaml"
exit 1
fi

# if [ -n "${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}" ]; then
# echo "${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}" | base64 -d > ios/Runner/GoogleService-Info.plist
#else
# echo "Error: GOOGLE_SERVICE_INFO_PLIST_BASE64 secret is required"
# exit 1
#fi

# Building Android APK
- name: Build Android APK
Expand All @@ -69,13 +82,13 @@ jobs:
- name: Get version
id: version
run: |
VERSION=$(grep 'version:' pubspec.yaml | sed 's/version: //' | tr -d '[:space:]')
VERSION=$(grep 'version:' pubspec.yaml | sed 's/version: //' | cut -d+ -f1 | tr -d '[:space:]')
echo "version=$VERSION" >> $GITHUB_OUTPUT

# Rename APK file
- name: Rename APK
run: |
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/whisper_v${{ steps.version.outputs.version }}.apk
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/shept_v${{ steps.version.outputs.version }}.apk

# Creating GitHub release
- name: Create Release
Expand All @@ -89,4 +102,4 @@ jobs:
draft: false
prerelease: false
files: |
build/app/outputs/flutter-apk/whisper_v${{ steps.version.outputs.version }}.apk
build/app/outputs/flutter-apk/shept_v${{ steps.version.outputs.version }}.apk
62 changes: 62 additions & 0 deletions .github/workflows/flutter-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
ci:
name: Analyze and test
# Fork pull requests cannot read repository secrets, so analysis cannot run.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true

# Firebase is retired: no generated options file is needed any more.
# - name: Create Firebase options
# env:
# FIREBASE_OPTIONS_DART_BASE64: ${{ secrets.FIREBASE_OPTIONS_DART_BASE64 }}
# run: |
# if [ -z "$FIREBASE_OPTIONS_DART_BASE64" ]; then
# echo "FIREBASE_OPTIONS_DART_BASE64 secret is required for analysis"
# exit 1
# fi
# echo "$FIREBASE_OPTIONS_DART_BASE64" | base64 -d > lib/firebase_options.dart

- name: Get dependencies
run: flutter pub get

- name: Format (changed files)
run: |
BASE="origin/${{ github.base_ref || 'main' }}"
git fetch origin "${{ github.base_ref || 'main' }}" 2>/dev/null || true
FILES=$(git diff --name-only --diff-filter=ACMR "$BASE"...HEAD -- '*.dart' | tr '\n' ' ')
if [ -z "$FILES" ]; then
echo "No changed Dart files."
exit 0
fi
dart format --output=none --set-exit-if-changed $FILES

- name: Analyze
# Infos are not fatal: the legacy UI has known lints. Errors and warnings block.
run: flutter analyze --no-fatal-infos

- name: Test
run: flutter test

- name: Secret scan
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/flutter-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Flutter E2E

on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
workflow_call:

permissions:
contents: read

jobs:
e2e:
name: Linux desktop integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout app
uses: actions/checkout@v7
with:
path: shept

# Both Dart clients come from their release tags (pubspec.yaml), so no
# sibling checkouts are needed.

- name: Install Linux desktop dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config xvfb \
libgtk-3-dev liblzma-dev libsecret-1-dev

- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true

- name: Get dependencies
working-directory: shept
run: |
flutter config --enable-linux-desktop
flutter pub get

- name: Run E2E
working-directory: shept
run: xvfb-run -a flutter test integration_test -d linux
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ migrate_working_dir/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.flutter_mcp/
.mcp_screenshots/
.pub-cache/
.pub/
/build/
Expand All @@ -46,4 +48,5 @@ app.*.map.json
firebase.json
lib/firebase_options.dart
android/app/google-services.json
ios/Runner/GoogleService-Info.plist
ios/Runner/GoogleService-Info.plist
pubspec_overrides.yaml
15 changes: 6 additions & 9 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "be698c48a6750c8cb8e61c740ca9991bb947aba2"
revision: "db50e20168db8fee486b9abf32fc912de3bc5b6a"
channel: "stable"

project_type: app
Expand All @@ -13,14 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
base_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
- platform: android
create_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
base_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
- platform: ios
create_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
base_revision: be698c48a6750c8cb8e61c740ca9991bb947aba2
create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
- platform: linux
create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a

# User provided section

Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"version": "0.2.0",
"configurations": [
{
"name": "whisper",
"name": "shept",
"request": "launch",
"type": "dart"
},
{
"name": "whisper (profile mode)",
"name": "shept (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "whisper (release mode)",
"name": "shept (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
Expand Down
73 changes: 73 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# shept — agent contract

Flutter 3.47 / Dart 3.13 client for Shept. Talks to `shept-server` over HTTP (generated `shept_openapi_client_dart`)
and WebSocket (`shept_websocket_client_dart`).

## Commands

- deps: `flutter pub get`
- analyze: `flutter analyze --no-fatal-infos` (errors and warnings block, infos do not)
- format: `dart format` on the files you touched
- test: `flutter test`
- e2e: `flutter test integration_test -d linux` (needs Linux desktop toolchain)
- build: `flutter build apk --release` (no Firebase files needed; Firebase is retired)

## AI / MCP tooling

OpenCode has two Flutter MCP servers wired globally (config in `~/.config/opencode/opencode.json`,
not in this repository). Use them for the fast loop, but the shell gates below still define done.

| Server | Role |
|---|---|
| `dart` | `analyze_files`, symbol resolution, `run_tests`, `pub`, hot reload/restart, DTD connection, widget inspector |
| `flutter-mcp-toolkit` | screenshots, semantic snapshot, tap/type, recent logs — UI verification of a running debug build |

1. At session start register roots: `shept`, `../shept_openapi_client_dart`, `../shept_websocket_client_dart`.
2. MCP-driven runs use a fixed port so the toolkit can attach: `flutter run -d linux --device-vmservice-port=8181`. One running instance only.
3. UI work: `fmt_semantic_snapshot` → `ref` → `fmt_tap_widget`/`fmt_enter_text`, then hot reload after every widget change. Pixel capture is unsupported on Linux desktop (needs the app permission bridge), so use `fmt_hot_reload_flutter`, not `fmt_hot_reload_and_capture`.
4. Never call `fmt_evaluate_dart_expression`; it is denied in the OpenCode `permissions` config and there is no server-side flag for it.
5. Toolkit and debug builds only with test data — never with a real account.
6. `pub add`/`pub remove` and any `pubspec.yaml` change need explicit confirmation. `dart_fix` is disabled on purpose: it would rewrite the generated clients.
7. `flutter analyze --no-fatal-infos` from the shell remains the definition-of-done gate; MCP analysis does not replace it.

## Hard rules

1. Never commit secrets, keys, `.env*`, `firebase_options.dart`, `google-services.json` or `firebase.json`.
2. Do not edit `shept_openapi_client_dart/lib` or `shept_websocket_client_dart/lib` by hand. Contract changes go through `shept-server` and regeneration (skill `contract-change`).
3. `lib/media_download.dart` is a hand-written extension of the generated client — when the download changes, edit this file, not the generated `downloadMedia`.
4. Crypto: never lower RSA 4096, AES-256-GCM or PBKDF2 parameters. No key may leave the device in plaintext and no seed may be constant.
5. Do not weaken the app lock (password, biometrics), not even "temporarily for debugging".
6. Never disable a test, lint or the analyzer to get CI green. Fix it, or file an issue and escalate.
7. Force-push only to your own feature branch, never to `main`.

## Where it hurts

- **Media upload**: `uploadMedia(file, receiverId)` — the argument order comes from the generator, not from logic. Verify call sites after regenerating the client.
- **Pinned clients**: `pubspec.yaml` pulls both Dart clients from their `v0.5.0` tags, so the build records the contract it was made against. `pubspec_overrides.yaml` (gitignored) points at the sibling checkouts for local work; never commit it.
- **Firebase**: retired. Dependencies and the Google Services plugin are commented out, FCM code is kept dead in comments; do not re-enable without a new Firebase project.
- **Login needs a challenge**: `CryptoUtils.generateRsaJwt` requires a `nonce`
fetched from `AuthenticationApi.authChallenge()`; the server spends it on use.
A login without it is refused.
- **Privacy defaults**: notifications may show the decrypted text; the setting
lives in the `settings` box (`CacheUtils.getNotificationPreview`). Plaintext
temp media is swept on startup (`MediaUtils.clearTempFiles`) and must stay
that way — the temp dir may never hold readable media after a restart.
- **Server URL**: `Utils.isAllowedServerUrl` allows HTTP only in debug builds.
- **Delivery ack**: `ChatSender` keeps a message `sending` until the server acks it
(`WsResponseType.ack`), and `Utils.onWsMessageReceived` acks what it stored. Do
not mark a message `sent` on the socket write; that hides lost messages.
- **Message storage**: one Hive key per message (`<conversation>|<microseconds>`),
so a new message never rewrites a chat. Do not go back to a list per chat.
- **Media is single-delivery**: the server deletes the file on confirm, so a
second device or a reinstall shows `MediaDownloadStatus.expired`.

## Definition of done

- New non-trivial logic has a test (`test/`).
- `flutter analyze --no-fatal-infos` reports no errors and no warnings.
- Formatting is clean on the files you touched.
- A contract change ships the regenerated client and the updated call sites in one PR.

## When unsure

Stop and ask. Security decisions (keys, encryption, auth) are not up for guessing.
Loading
Loading