Skip to content

Latest commit

 

History

History
159 lines (139 loc) · 11.2 KB

File metadata and controls

159 lines (139 loc) · 11.2 KB

work.md — Project Working Memory

Current Status

  • State: complete
  • Last updated: 2026-07-31 00:46 Asia/Bangkok
  • Current task: Refresh app icon and README, tighten top spacing, add creator/version page, and improve runtime efficiency
  • Main goal: Local-first income/expense app with multiple wallets, monthly budgets, macOS 26 monochrome UI, and Touch Bar-friendly quick actions

User Request

แก้ icon/README เพิ่มความสวยงาม ลดขอบด้านบนที่สูงเกิน เพิ่มหน้าเครดิต “สร้างโดย 9GOLF Horari Team” พร้อมเลข V และปรับ code/performance ทั้งระบบ

Active Plan

  • Inspect current icon, native layout, version metadata, README, and working tree
  • Archive the icon assets before replacement
  • Install a transparent production icon and rebuild .icns
  • Tighten native top spacing and refine shared visual components
  • Add a dedicated creator/version page
  • Reduce repeated formatting and calculation work
  • Rewrite README for the current native app
  • Build, launch, and visually verify the result
  • Inspect repository and confirm it is an empty workspace
  • Build local-first data model and CRUD flows
  • Build monochrome macOS-inspired responsive UI
  • Add keyboard/Touch Bar-friendly quick actions
  • Run syntax and browser smoke checks
  • Create native Swift/AppKit target
  • Add real NSTouchBar actions
  • Build and launch .app bundle
  • Build a responsive SwiftUI dashboard shell
  • Add animated metrics, sparklines, and cash-flow chart
  • Rebuild all native pages and add-data sheets
  • Add app settings and local data management
  • Replace collapsing Touch Bar items with one fixed-width segmented control
  • Launch and visually verify the redesigned app

Decisions

Date Decision Reason
2026-07-30 Use dependency-free HTML/CSS/JS with localStorage Repo is empty; keeps setup immediately runnable and offline-friendly
2026-07-30 Treat recurring monthly items as budgets Gives the user a clear monthly spending target without auto-creating fake transactions
2026-07-30 Touch Bar support via focused quick-action strip and keyboard shortcuts Browser apps cannot directly control physical Touch Bar hardware without a native wrapper
2026-07-30 Keep browser MVP and add a separate SwiftPM AppKit target Preserves the working fallback while delivering a native macOS app
2026-07-30 Store native data as Codable JSON in Application Support Offline local persistence with no new dependency
2026-07-30 Host a new SwiftUI + Charts interface inside the existing AppKit window Fixes layout quality while preserving the tested store and real NSTouchBar host
2026-07-30 Use one left-aligned horizontal Touch Bar scroller instead of a principal item Avoids the macOS Control Strip, supports overflow, and allows colored actions
2026-07-31 Route Touch Bar actions into the SwiftUI sheet instead of the legacy NSAlert The old AppKit accessory stack collapsed to zero height and made Touch Bar actions appear broken
2026-07-31 Add Codable expense presets with decode fallback Existing local JSON upgrades without losing wallets, transactions, or budgets
2026-07-31 Aggregate chart data in one transaction pass Removes repeated 30-day full-list scans and lowers idle CPU work
2026-07-31 Release the visual/credits refresh as V1.1.0 build 2 Keeps the version visible and consistent across Info.plist, UI, and README
2026-07-31 Reuse one THB formatter and one legacy host formatter Avoids recreating NumberFormatter during SwiftUI render passes
2026-07-31 Use the real bundled PNG in the SwiftUI sidebar/credits page Keeps the app identity consistent with Dock, README, and in-app UI

Files Changed

File Action Notes
work.md created resume memory
index.html created app shell, views, forms, quick actions
styles.css created monochrome macOS-inspired responsive design
app.js created localStorage state, CRUD, navigation, shortcuts
README.md edited setup and Touch Bar boundary
Package.swift created SwiftPM native target
Sources/MyMoneyFlow/AppMain.swift created AppKit host, local store, backup/import/reset, left-aligned scrollable colored NSTouchBar controls
Sources/MyMoneyFlow/DashboardView.swift created SwiftUI dashboard, Charts, pages, forms, settings, animation
Resources/Info.plist created macOS application bundle metadata
build_app.sh created build .app bundle
Resources/MyMoneyFlow-AppIcon.png replaced transparent production icon generated from the existing wallet identity
Resources/MyMoneyFlow.icns replaced regenerated iconset for macOS app sizes
Sources/MyMoneyFlow/DashboardView.swift edited tighter top spacing, real app mark, credits page, bundle version, cached formatter
Sources/MyMoneyFlow/AppMain.swift edited reuse the native host currency formatter
Resources/Info.plist edited V1.1.0 build 2
build_app.sh edited include the PNG used by the SwiftUI interface
README.md rewritten current features, setup, shortcuts, storage, version, and credits
archive/ARCHIVE_LOG.md created restore instructions for the replaced icon assets

Archived Files

Original Archived Reason
Resources/MyMoneyFlow-AppIcon.png archive/2026-07-31/Resources/MyMoneyFlow-AppIcon.png preserve the original RGB icon before adding transparent corners
Resources/MyMoneyFlow.icns archive/2026-07-31/Resources/MyMoneyFlow.icns preserve the original icon bundle before regeneration

Commands Run

Command Result Notes
repository inspection pass only README.md existed
node --check app.js pass JavaScript syntax valid
local browser smoke pass dashboard rendered, transaction saved, wallet/budget views opened
mobile browser smoke at 390px pass responsive layout rendered and Touch Bar action strip remained usable
swift build -c release pass native AppKit executable linked successfully
./build_app.sh pass .build/MyMoneyFlow.app created
open .build/MyMoneyFlow.app + process check pass native app process remained running
plutil -p .build/MyMoneyFlow.app/Contents/Info.plist pass APPL bundle metadata valid
native launch before fix fail process alive but System Events reported 0 windows
explicit NSApplication.shared entry point pass AppKit lifecycle invoked and window created
native launch after fix pass frontmost=true, windows=1, MyMoneyFlow
native screenshot inspection pass sidebar, dashboard, graph, balances, and wallet rows visible
System Events dashboard query pass 1120x792 window; balance, income, expense, and graph labels present
System Events transactions page pass heading and 3 seeded transactions visible
System Events wallets page pass 3 wallets and total balance visible
System Events budgets page pass 3 monthly budgets and spent amounts visible
first SwiftUI production build pass new DashboardView and AppKit host linked
redesigned app launch pass frontmost=true, one 1240×816 native window
dashboard screenshot inspection pass sidebar, three metric cards, corrected two-series chart, wallet/recent cards
settings navigation and screenshot pass default wallet, reduced motion, Touch Bar status, export/import/reset, app info visible
final production build pass segmented Touch Bar and settings compiled into .build/MyMoneyFlow.app
Touch Bar scroller production build pass left-aligned 488pt viewport with 632pt colored action content linked
Touch Bar settings preview screenshot pass green income, red expense, purple transfer, black settings/balance pills visible
preset migration launch pass 10 built-in presets loaded from an existing pre-preset data file
preset page keyboard navigation pass ⌘5 opened searchable preset grid with real monthly spent totals
preset transaction form pass expense form opens with preset picker and SwiftUI inputs visible
performance idle sample pass process reached 0.0% CPU after UI settled; RSS about 69–87 MB during checks
transparent icon validation pass 1254×1254 RGBA PNG with alpha; .icns regenerated from 16–1024px variants
swift build -c release pass V1.1.0 native source compiled and linked
./build_app.sh pass production .build/MyMoneyFlow.app includes PNG, ICNS, and Info.plist
native overview visual check pass top spacing reduced; sidebar icon/name/version fit on one line
native credits visual check pass 9GOLF, Horari Team, V1.1.0, build 2, and app values visible
credits/settings semantic check pass ⌘6 and ⌘, navigation exposes expected labels
final idle sample pass 0.0% CPU and about 68 MB RSS after UI settled
git diff --check pass no whitespace errors

Bugs / Risks

  • Physical Touch Bar pixels cannot be captured by the test environment. The centered principal item was removed and replaced with one left-aligned 488pt horizontal scroller containing 632pt of colored actions; source wiring, host window, build, launch, and matching in-app preview are verified.
  • Touch Bar buttons now post into the same SwiftUI transaction sheet used by the app; the broken zero-height legacy alert is no longer used for Touch Bar entry.
  • Existing native JSON dates were created with a Buddhist calendar and are migrated to the current Gregorian month on startup so monthly totals are correct.
  • The new app icon was produced with the built-in ImageGen workflow, converted from chroma key to alpha locally, and visually checked before packaging.

Next Steps

  • Implement browser app shell and state
  • Implement native AppKit shell and local persistence
  • Wire NSTouchBar buttons to native actions
  • Build and launch app bundle
  • Verify visible native window after launch
  • Prevent duplicate AppKit launch-window creation
  • Add native graph and page navigation
  • Verify transactions, wallets, and budgets pages
  • Redesign dashboard with SwiftUI + Charts
  • Add settings and data backup/import/reset
  • Fix Touch Bar item collapsing
  • Move Touch Bar actions left and add horizontal scrolling/colors
  • Route Touch Bar actions to working SwiftUI forms
  • Add built-in and custom expense presets
  • Add transaction search, matching expense total, and category summaries
  • Reduce chart scans, blur, shadow, and continuous chart animation
  • Refresh the icon and regenerate .icns
  • Reduce excessive top spacing
  • Add the 9GOLF / Horari Team credits page and V1.1.0 metadata
  • Rewrite README and verify the final app bundle

Resume Prompt

อ่าน work.md แล้วทำต่อจาก MyMoneyFlow V1.1.0 build 2 ปัจจุบัน หาก Touch Bar บนเครื่องจริงยังไม่แสดง 4 ปุ่ม ให้ตรวจ active window/customization state ก่อนเปลี่ยน architecture