Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b74b224
Add durable incoming photo shares and per-order VietQR payments
Sentechtipsvn Nov 13, 2026
c1d1262
Fix shared-invoice simulator fixture URL type
Sentechtipsvn Nov 13, 2026
f0a6f6a
Document verified unsigned IPA and remaining device checks [skip ci]
Sentechtipsvn Nov 13, 2026
a488258
Fix AltStore App Group provisioning and runtime remapping in 0.3.1
Sentechtipsvn Nov 13, 2026
90fcde8
Record verified 0.3.1 AltStore entitlement metadata [skip ci]
Sentechtipsvn Nov 13, 2026
e0275db
Fix shared image representation fallback and allow reissuing order QR…
Sentechtipsvn Nov 13, 2026
4fbd186
Record verified 0.3.2 image and QR regression results [skip ci]
Sentechtipsvn Nov 13, 2026
77c732c
Fix image intake, selectable reports and monthly reconciliation for S…
Sentechtipsvn Nov 13, 2026
b1ad9da
Check the full Google directions URL across Foundation implementations
Sentechtipsvn Nov 13, 2026
a87cdb8
Document Sweep 0.4.0 passing validation and IPA verification [skip ci]
Sentechtipsvn Nov 13, 2026
a8f31f7
Publish verified Sweep 0.4.0 IPA for the shared AltStore source [skip…
Sentechtipsvn Nov 14, 2026
faecbcf
Document shared AltStore source and verified public IPA [skip ci]
Sentechtipsvn Nov 14, 2026
9f181fb
Implement approved Sweep 0.5 delivery flows, compressed image intake …
Sentechtipsvn Nov 14, 2026
7f915ff
Preserve report drafts, verify reset backups and normalize seller ali…
Sentechtipsvn Nov 14, 2026
cd565b9
Complete versioned migration, verified atomic reset and delivery draf…
Sentechtipsvn Nov 14, 2026
5686547
Finish Sweep 0.5 sharing, draft recovery and delivery confirmations
Sentechtipsvn Nov 14, 2026
c732115
Implement approved Sweep 0.6: compact controls, attendance payroll, r…
Sentechtipsvn Nov 14, 2026
803634f
Keep payroll setup clear and inherit policy without carrying monthly …
Sentechtipsvn Nov 14, 2026
e175a6d
Present shared-image signature confirmation after modal appearance an…
Sentechtipsvn Nov 14, 2026
09e1ce8
Display payroll years without localized thousands grouping
Sentechtipsvn Nov 14, 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
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,18 @@ jobs:
xcodebuild -project Sweep.xcodeproj -scheme Sweep -configuration Release \
-sdk iphoneos -destination 'generic/platform=iOS' -derivedDataPath build \
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO build | tee build.log
- name: Package unsigned IPA
- name: Package IPA for AltStore signing
run: |
mkdir -p dist/Payload
cp -R build/Build/Products/Release-iphoneos/Sweep.app dist/Payload/
cd dist
/usr/bin/zip -qr Sweep-0.2.1-unsigned.ipa Payload
shasum -a 256 Sweep-0.2.1-unsigned.ipa > SHA256.txt
python3 Tools/package_ipa.py --app build/Build/Products/Release-iphoneos/Sweep.app \
--output dist/Sweep-0.6.0-AltStore.ipa
- name: Upload phone-test beta
uses: actions/upload-artifact@v4
with:
name: Sweep-0.2.1-beta-unsigned
name: Sweep-0.6.0-AltStore
path: |
dist/Sweep-0.2.1-unsigned.ipa
dist/Sweep-0.6.0-AltStore.ipa
dist/SHA256.txt
dist/SIGNING-METADATA.json
retention-days: 14
- name: Build and validate Bill shortcut
run: |
Expand Down
117 changes: 117 additions & 0 deletions .github/workflows/feature-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Validate Sweep delivery workflows
on:
pull_request:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sweep-feature-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
runs-on: macos-15-intel
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Test ledger compatibility, durable share queue and QR amounts
run: swift test
- name: Generate project
run: |
brew install xcodegen
xcodegen generate
- name: Build app and embedded Share Extension
run: |
set -o pipefail
xcodebuild -project Sweep.xcodeproj -scheme Sweep -configuration Release \
-sdk iphoneos -destination 'generic/platform=iOS' -derivedDataPath build \
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO build | tee build.log
test -d build/Build/Products/Release-iphoneos/Sweep.app/PlugIns/SweepShare.appex
- name: Package IPA with verifiable App Group metadata for AltStore
run: |
python3 Tools/package_ipa.py --app build/Build/Products/Release-iphoneos/Sweep.app \
--output dist/Sweep-0.6.0-AltStore.ipa
- name: Upload app for AltStore signing
uses: actions/upload-artifact@v4
with:
name: Sweep-0.6.0-AltStore
path: |
dist/Sweep-0.6.0-AltStore.ipa
dist/SHA256.txt
dist/SIGNING-METADATA.json
retention-days: 14
- name: Upload device build log
if: failure()
uses: actions/upload-artifact@v4
with:
name: Sweep-device-build-log
path: build.log
if-no-files-found: ignore
ui:
name: Simulator intake regression checks
needs: validate
runs-on: macos-15-intel
timeout-minutes: 35
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Generate project
run: |
brew install xcodegen
xcodegen generate
- name: Verify shared image confirmation after presentation
run: |
set -o pipefail
SIMULATOR_ID=$(xcrun simctl list devices available -j | python3 -c 'import json,sys; d=json.load(sys.stdin); print(next(x["udid"] for runtime,items in d["devices"].items() if "iOS-18-5" in runtime for x in items if x["name"] == "iPhone 16"))')
xcrun simctl boot "$SIMULATOR_ID" || true
xcrun simctl bootstatus "$SIMULATOR_ID" -b
xcodebuild -project Sweep.xcodeproj -scheme Sweep -configuration Debug \
-destination "platform=iOS Simulator,id=$SIMULATOR_ID" -derivedDataPath build-simulator \
-resultBundlePath build-share-ui.xcresult CODE_SIGNING_ALLOWED=NO \
-parallel-testing-enabled NO \
-test-timeouts-enabled YES -default-test-execution-time-allowance 180 -maximum-test-execution-time-allowance 300 \
-only-testing:SweepUITests/SweepUITests/testSharedImageReviewImportQRSetupAndRelaunch test | tee share-test.log
- name: Verify remaining delivery screens and new tools
run: |
set -o pipefail
SIMULATOR_ID=$(xcrun simctl list devices available -j | python3 -c 'import json,sys; d=json.load(sys.stdin); print(next(x["udid"] for runtime,items in d["devices"].items() if "iOS-18-5" in runtime for x in items if x["name"] == "iPhone 16"))')
xcodebuild -project Sweep.xcodeproj -scheme Sweep -configuration Debug \
-destination "platform=iOS Simulator,id=$SIMULATOR_ID" -derivedDataPath build-simulator \
-resultBundlePath build-ui.xcresult CODE_SIGNING_ALLOWED=NO \
-parallel-testing-enabled NO \
-test-timeouts-enabled YES -default-test-execution-time-allowance 180 -maximum-test-execution-time-allowance 300 \
-only-testing:SweepUITests/SweepUITests/testBillPreviewOCRImportAndRelaunch \
-only-testing:SweepUITests/SweepUITests/testRecordedTransferStillDisplaysQRCode \
-only-testing:SweepUITests/SweepUITests/testReportImageSelectionAndCompactTransferCaption \
-only-testing:SweepUITests/SweepUITests/testReconciliationEmptyMonthHasNoFiguresFromAnotherMonth \
-only-testing:SweepUITests/SweepUITests/testIntakeHasOnlyPhotoAndCameraSourcesAtLargeTextSize \
-only-testing:SweepUITests/SweepUITests/testApprovedCashWorkflowAndNewTools \
-only-testing:SweepUITests/SweepUITests/testUpdate02CompactContactsAndPlaces \
-only-testing:SweepUITests/SweepUITests/testUpdate02AttendanceCalendarSavesAndPersists test-without-building | tee simulator-test.log
- name: Export screenshots
if: always()
run: |
if [ -d build-share-ui.xcresult ]; then
xcrun xcresulttool export attachments --path build-share-ui.xcresult --output-path ui-share-screenshots || true
fi
if [ -d build-ui.xcresult ]; then
xcrun xcresulttool export attachments --path build-ui.xcresult --output-path ui-screenshots || true
fi
- uses: actions/upload-artifact@v4
if: always()
with:
name: Sweep-feature-validation-evidence
path: |
build.log
share-test.log
simulator-test.log
ui-share-screenshots/
ui-screenshots/
if-no-files-found: ignore
Binary file added Design/AppIcon-Source.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let package = Package(
products: [.library(name: "SweepCore", targets: ["SweepCore"])],
targets: [
.target(name: "SweepCore", path: "Sweep",
exclude: ["App", "Services", "Views", "Info.plist", "PrivacyInfo.xcprivacy", "Assets.xcassets"],
exclude: ["App", "Services", "Views", "Info.plist", "PrivacyInfo.xcprivacy", "Assets.xcassets", "Sweep.entitlements"],
sources: ["Core", "Imaging"]),
.testTarget(name: "SweepCoreTests", dependencies: ["SweepCore"], path: "Tests")
]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ xcodebuild -project Sweep.xcodeproj -scheme Sweep -configuration Release \
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO build
```

GitHub Actions **Build Sweep IPA** chạy kiểm thử core và build app arm64. Artifact chứa **IPA chưa ký**, cần ký/cài qua công cụ sideload. Chưa tự phát hành lên nguồn AltStore; chỉ thêm sau khi thử trên máy thật.
GitHub Actions **Build Sweep IPA** chạy kiểm thử core và build app arm64. Bản Sweep 0.4.0 (7) đã có trong [nguồn AltStore chung với StikDebug VN](https://raw.githubusercontent.com/Sentechtipsvn/Stikdebug-VN/main/altstore/altstore.json). IPA giữ Share Extension và metadata App Groups; AltStore vẫn cần ký lại để cài trên iPhone.

Kiểm thử mới bao gồm công theo ngày ký, chống lặp, tiền thực tế, đối soát CK, lịch sử bất biến, SQLite mở lại, nhập schema Bill, CSV, sao lưu/ảnh lỗi và điều hướng trên simulator. Các bài kiểm thử công cụ ảnh: nhóm trùng theo hash/byte, bỏ tài nguyên không hỗ trợ, gợi ý giữ ảnh yêu thích, ngăn xóa hết nhóm, không đếm lặp ID, đường dẫn/symlink thoát thư mục, ảnh nén đúng kích thước/chiều xoay/bỏ GPS/giữ đầu vào và từ chối tệp lỗi. Chúng không thay thế kiểm thử PhotoKit/quyền/xóa/iCloud trên iPhone.

Expand Down
1 change: 1 addition & 0 deletions Releases/0.4.0/SHA256.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
25b01fcd19cc66d84792e9a72d779a14a9526523eb2058477154f75cc92754ef Sweep-0.4.0-AltStore.ipa
Binary file added Releases/0.4.0/Sweep-0.4.0-AltStore.ipa
Binary file not shown.
11 changes: 11 additions & 0 deletions Releases/0.4.0/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.4.0",
"build": "7",
"size": 1296709,
"sha256": "25b01fcd19cc66d84792e9a72d779a14a9526523eb2058477154f75cc92754ef",
"appBundleIdentifier": "com.sentechtipsvn.sweep",
"extensionBundleIdentifier": "com.sentechtipsvn.sweep.share",
"sourceCommit": "b1ad9da4c92c160d6dca7d32b8f12029222f60c3",
"validationWorkflow": "https://github.com/Sentechtipsvn/Sweep/actions/runs/43525588962",
"signing": "Ad-hoc App Group metadata; AltStore must re-sign the app and retained Share Extension."
}
41 changes: 41 additions & 0 deletions Sweep/App/DeliveryTestSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
import UIKit

extension DeliveryStore {
func installUpdate02UITestFixture() {
guard ledger.contacts?.isEmpty != false else { return }
_ = change { ledger in
try ledger.saveContact(DeliveryContact(name: "Liên hệ thử 01", phone: "0900000001", zalo: "", aliases: "TEL", role: "Bán hàng"))
try ledger.saveContact(DeliveryContact(name: "Liên hệ thử 02", phone: "0900000002", zalo: "", aliases: "", role: "Tài xế"))
try ledger.savePlace(DeliveryPlace(customer: "Điểm giao thử", phone: "0900000003", address: "Địa chỉ thử nghiệm", kind: "Khách hàng"))
}
}
func installUITestFixture() {
guard ProcessInfo.processInfo.arguments.contains("--delivery-ui-testing"), ledger.orders.isEmpty else { return }
do {
Expand All @@ -20,6 +28,39 @@ extension DeliveryStore {
}

extension DeliveryStore {
func installMonthlyUITestFixture() {
guard ProcessInfo.processInfo.arguments.contains("--delivery-ui-testing"), let order = ledger.orders.first, order.settlement == nil else { return }
_ = change { ledger in
try ledger.sign(order.id, at: Date())
try ledger.settle(order.id, value: Settlement(outcome: .delivered, mode: .mixed, cash: 665_000, bank: 1_500_000, note: "", at: Date(), route: .transferNow))
try ledger.handover(500_000, at: Date(), note: "UI test monthly remittance")
}
}

func installQRUITestFixture() {
guard ProcessInfo.processInfo.arguments.contains("--delivery-ui-testing"), let order = ledger.orders.first else { return }
_ = change { ledger in
// Official VietQR documentation's public example; never part of a Release build.
ledger.settings.vietQR = VietQRAccount(bankID: "ICB", accountNumber: "113366668888", accountName: "PUBLIC DEMO ACCOUNT")
try ledger.sign(order.id, at: Date())
try ledger.settle(order.id, value: Settlement(outcome: .delivered, mode: .bank, cash: 0, bank: order.total, note: "UI test: recorded transfer", at: Date(), route: .transferNow))
}
}

func installSharedUITestFixture() async throws {
guard ProcessInfo.processInfo.arguments.contains("--delivery-ui-testing") else { return }
let marker = root.appendingPathComponent("shared-fixture-sent")
guard !FileManager.default.fileExists(atPath: marker.path) else { return }
try Data().write(to: marker)
do {
let source = try billUITestResult().candidates[0].image
guard let image = UIImage(contentsOfFile: source.path) else { throw DeliveryError.invalid("Không mở được ảnh mẫu UI.") }
let received = try await SharedInvoiceLoader.load(from: NSItemProvider(item: image, typeIdentifier: "public.image"))
defer { try? FileManager.default.removeItem(at: received) }
_ = try SharedInvoiceInbox.live().add(received)
} catch { try? FileManager.default.removeItem(at: marker); throw error }
}

func billUITestResult() throws -> BillImportResult {
let image = UIGraphicsImageRenderer(size: CGSize(width: 1400, height: 800)).image { context in
UIColor.white.setFill(); context.fill(CGRect(x: 0, y: 0, width: 1400, height: 800))
Expand Down
29 changes: 21 additions & 8 deletions Sweep/App/SweepApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,39 @@ import SwiftUI
struct SweepApp: App {
@StateObject private var library = PhotoStore()
@StateObject private var delivery = DeliveryStore()
@StateObject private var router = SweepRouter()
@StateObject private var renewal = RenewalManager()
@Environment(\.scenePhase) private var scenePhase
var body: some Scene {
WindowGroup {
TabView {
OrdersView().tabItem { Label("Đơn hàng", systemImage: "shippingbox") }
TabView(selection: $router.tab) {
OrdersView().tabItem { Label("Đơn hàng", systemImage: "shippingbox") }.tag(0)
NavigationStack { ReconciliationView() }
.tabItem { Label("Đối soát", systemImage: "checklist") }
NavigationStack { HomeView() }
.tabItem { Label("Công cụ", systemImage: "sparkles") }
NavigationStack { SettingsView() }
.tabItem { Label("Cài đặt", systemImage: "gearshape") }
.tabItem { Label("Lịch sử", systemImage: "clock.arrow.circlepath") }.tag(1)
NavigationStack(path: $router.tools) { HomeView().navigationDestination(for: String.self) { _ in PayrollView() } }
.tabItem { Label("Công cụ", systemImage: "sparkles") }.tag(2)
NavigationStack(path: $router.settings) { SettingsView().navigationDestination(for: String.self) { _ in RenewalView() } }
.tabItem { Label("Cài đặt", systemImage: "gearshape") }.tag(3)
}
.tint(.green)
.tint(SweepStyle.blue)
.environmentObject(library)
.environmentObject(delivery)
.environmentObject(router)
.environmentObject(renewal)
.onOpenURL { router.open($0) }
.onReceive(NotificationCenter.default.publisher(for: .sweepInboxReceived)) { _ in router.tab = 0 }
.onReceive(NotificationCenter.default.publisher(for: .sweepRenewalSelected)) { _ in router.tab = 3; router.settings = ["renewal"] }
.onChange(of: scenePhase) { _, phase in if phase == .active { Task { await renewal.refresh() } } }
.background(DeliveryFeedback(store: delivery).frame(width: 0, height: 0))
.task {
#if DEBUG
if ProcessInfo.processInfo.arguments.contains("--seed-delivery") { delivery.installUITestFixture() }
if ProcessInfo.processInfo.arguments.contains("--qr-ui-testing") { delivery.installQRUITestFixture() }
if ProcessInfo.processInfo.arguments.contains("--monthly-ui-testing") { delivery.installMonthlyUITestFixture() }
if ProcessInfo.processInfo.arguments.contains("--update02-ui-testing") { delivery.installUpdate02UITestFixture() }
#endif
if library.canRead { library.reload() }
await renewal.refresh()
}
}
}
Expand Down
59 changes: 59 additions & 0 deletions Sweep/App/SweepRouting.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import SwiftUI
import AppIntents

extension Notification.Name {
static let sweepInboxReceived = Notification.Name("SweepInboxReceived")
static let sweepRenewalSelected = Notification.Name("SweepRenewalSelected")
}
@MainActor
final class SweepRouter: ObservableObject {
@Published var tab = 0
@Published var tools: [String] = []
@Published var settings: [String] = []
@Published var orderID: UUID?
func open(_ url: URL) {
guard url.scheme == "sweep", url.user == nil, url.password == nil,
let host = url.host, url.query == nil, url.fragment == nil else { return }
switch host {
case "attendance", "payroll":
guard url.path.isEmpty else { return }; tab = 2; tools = ["payroll"]
case "renewal":
guard url.path.isEmpty else { return }; tab = 3; settings = ["renewal"]
case "order":
guard let id = UUID(uuidString: String(url.path.dropFirst())), url.path.split(separator: "/").count == 1 else { return }
orderID = id; tab = 0
default: break
}
}
}
struct ReceiveSweepInvoice: AppIntent {
static var title: LocalizedStringResource = "Nhận phiếu Sweep"
static var description = IntentDescription("Nhận ảnh chia sẻ và mở Sweep để kiểm tra, đọc và nhập đơn.")
static var openAppWhenRun = true
@Parameter(title: "Ảnh phiếu") var image: IntentFile
func perform() async throws -> some IntentResult {
let bytes = image.data
guard !bytes.isEmpty, bytes.count <= 80 * 1024 * 1024 else { throw DeliveryError.invalid("Chọn một ảnh phiếu tối đa 80 MB.") }
_ = try await Task.detached(priority: .userInitiated) {
let url = try IncomingInvoiceImage.copy(data: bytes)
defer { try? FileManager.default.removeItem(at: url) }
return try SharedInvoiceInbox.live().add(url)
}.value
await MainActor.run { NotificationCenter.default.post(name: .sweepInboxReceived, object: nil) }
return .result()
}
}
struct SweepShortcutGuide: View {
var body: some View {
List {
Section("Nhận ảnh và mở Sweep") {
Text("Trong Phím tắt, tạo phím tắt “Nhận phiếu Sweep”, bật Hiển thị trong bảng chia sẻ và nhận đầu vào là Hình ảnh.")
Text("Thêm tác vụ “Nhận phiếu Sweep” của ứng dụng Sweep, chọn Ảnh phiếu = Đầu vào phím tắt.")
Text("Trong Zalo hoặc Ảnh: Chia sẻ → Nhận phiếu Sweep. App nhận ảnh vào hàng đợi rồi mở trang kiểm tra đơn.")
}
Section {
Text("Cần thử trên iPhone với phiên bản Zalo đang dùng. Đây là đường Phím tắt; biểu tượng Sweep trong bảng chia sẻ vẫn là tiện ích nhận ảnh, không tự bật app chính.").font(.footnote).foregroundStyle(.secondary)
}
}.navigationTitle("Nhận ảnh bằng Phím tắt").navigationBarTitleDisplayMode(.inline)
}
}
Binary file modified Sweep/Assets.xcassets/AppIcon.appiconset/AppIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Sweep/Assets.xcassets/tool-cleanup.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images": [
{
"filename": "icon.svg",
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
},
"properties": {
"preserves-vector-representation": true
}
}
1 change: 1 addition & 0 deletions Sweep/Assets.xcassets/tool-cleanup.imageset/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Sweep/Assets.xcassets/tool-compress.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images": [
{
"filename": "icon.svg",
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
},
"properties": {
"preserves-vector-representation": true
}
}
Loading
Loading