Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
31fb828
chore(ci): add develop branch to CI triggers (#4)
lorentsob Mar 17, 2026
a954b91
fix(ci): remove manual simulator boot step that caused hang (#5)
lorentsob Mar 17, 2026
0e91d7b
chore(ci): use self-hosted runner, remove brew steps, fix picker test
lorentsob Mar 17, 2026
1eef999
Feature/phase 16 step ingredients (#6)
lorentsob Mar 17, 2026
f263569
chore(ci): clean stale xcresult before test run on self-hosted runner
lorentsob Mar 17, 2026
6fb7413
fix(bakes): prevent crash on bake close by passing ID to notification…
lorentsob Mar 17, 2026
e244bfe
fix(notifications): update remaining callers to new syncNotifications…
lorentsob Mar 17, 2026
f798da4
fix(concurrency): add @MainActor to views using ModelContext in Task …
lorentsob Mar 17, 2026
631257b
fix(notifications): use distinct method labels to resolve redeclarati…
lorentsob Mar 17, 2026
a0ba00d
fix(notifications): use distinct method labels to resolve redeclarati…
lorentsob Mar 17, 2026
dcd13ca
fix(notifications): update BakesView to use forBake label (#14)
lorentsob Mar 17, 2026
b19bf9e
fix(tests): use type-agnostic query for BakesScrollView (#15)
lorentsob Mar 17, 2026
6c00131
feat(bakes): enhance bake completion handling and UI updates (#16)
lorentsob Mar 18, 2026
7a06e83
pipeline build&test (#17)
lorentsob Mar 18, 2026
3a7b232
refactor(FormulaDetailView): comment out duplicate button functionali…
lorentsob Mar 18, 2026
a0819e3
elimina tasto modifica da ricetta (#18)
lorentsob Mar 18, 2026
54e9634
feat(FormulaDetailView): add formula editor and improve data safety
lorentsob Mar 18, 2026
1bf0043
feat(v2-shell): Phase 17 — V2 shell & Preparazioni hubs (#19)
lorentsob Mar 29, 2026
bccb247
feat(oggi): Phase 18 — cross-domain agenda feed, TodayOperationalCard…
lorentsob Mar 29, 2026
c9a63b9
v2
lorentsob Apr 3, 2026
2f2ee2c
docs: capture todo - selettore fonte lievito con ricalcolo automatico
lorentsob Apr 4, 2026
d061e17
feat: selettore fonte lievito con ricalcolo automatico quantità e tempi
lorentsob Apr 4, 2026
d7a43e4
docs: capture todo - formula edit button + unified list + restore-to-…
lorentsob Apr 4, 2026
d456cc6
feat: lista ricette unificata, modifica e ripristino default
lorentsob Apr 4, 2026
498d1bd
docs: close todo - formula edit and unified list
lorentsob Apr 4, 2026
589c631
fix: aggiungi default value inline a isSystemFormula/isModifiedFromDe…
lorentsob Apr 4, 2026
620c223
feat: ingredienti nel dettaglio ricetta + archivio ricette con swipe
lorentsob Apr 4, 2026
aaea765
fix: TextEditor piena larghezza per Dettagli e Note nel FormulaStepEd…
lorentsob Apr 4, 2026
11060b5
fix: @Bindable su FormulaDetailView per osservare le modifiche SwiftData
lorentsob Apr 4, 2026
846ec3d
fix: aggiornamento dettaglio ricetta dopo modifica (Query + defaultSt…
lorentsob Apr 4, 2026
b49b3d1
fix: simbolo SF valido, refresh dettaglio ricetta, TextEditor senza v…
lorentsob Apr 4, 2026
75d1011
fix: rimuovi .id basato su hash (freeze UI) + refresh solo a chiusura…
lorentsob Apr 4, 2026
5ad245f
feat: starter UX, bake scheduler, step cards, system formulas
lorentsob Apr 5, 2026
4d9f953
refactor: update EmptyStateView to support optional action and improv…
lorentsob Apr 8, 2026
0d51d09
feat: complete Phase 23 with glossary linking and knowledge enhancements
lorentsob Apr 8, 2026
636511e
chore: remove Batch subproject reference
lorentsob Apr 8, 2026
874a192
chore: align repo for public release
lorentsob Apr 9, 2026
ce73c95
chore: merge main into develop to resolve PR #22 conflicts
lorentsob Apr 9, 2026
f26181e
fix: replace Theme.Layout with Theme.Spacing in KnowledgeDetailView
lorentsob Apr 9, 2026
46b0efd
fix: resolve post-merge build errors
lorentsob Apr 9, 2026
eaa3fcf
fix: restore all source files to correct develop version
lorentsob Apr 9, 2026
f13674e
refactor: update SVG logo and improve BakeCreationView layout
lorentsob Apr 9, 2026
d7a4f2b
chore: default PR flow to develop, guard PRs to main
lorentsob Apr 9, 2026
830729e
chore: sync develop with main after docs on main
lorentsob Apr 9, 2026
f8668cf
docs: keep CONTRIBUTING.md in English
lorentsob Apr 9, 2026
ddc8de0
fix: update Italian text for clarity and consistency across various v…
lorentsob Apr 11, 2026
d9fd346
fix(notifications): add rolling overdue reminders (#24)
lorentsob Apr 16, 2026
960984e
ci: make xcpretty optional in iOS CI build step
lorentsob Nov 24, 2026
6f3689c
feat(splash): animated Batch logo, refreshed app icon and brand assets
lorentsob Nov 24, 2026
c1ca246
feat(bakes): adapt recipes to commercial yeast, bullet descriptions
lorentsob Nov 24, 2026
a7062d0
docs: add product design case history and knowledge export
lorentsob Nov 24, 2026
9731460
fix(content): restore knowledge guides and brioche formula lost in merge
lorentsob Nov 24, 2026
cdd2338
docs(knowledge): regenerate export with all 13 articles, add generator
lorentsob Nov 24, 2026
c44fed5
fix(forms): faster text entry and full-row tap targets in editors
lorentsob Nov 24, 2026
c2fce22
chore(project): regenerate Xcode project, keep team and settings in p…
lorentsob Nov 24, 2026
f35f92c
fix(ui): full-row tap targets and accessible child identifiers
lorentsob Nov 24, 2026
84198b8
test(ui): update UI tests to the v2 interface
lorentsob Nov 24, 2026
ab9fd22
chore: record main history in develop (no content changes)
lorentsob Nov 24, 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
44 changes: 28 additions & 16 deletions Levain.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions Levain.xcodeproj/xcshareddata/xcschemes/Levain.xcscheme
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2640"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic"
runPostActionsOnFailure = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand Down Expand Up @@ -54,7 +56,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
onlyGenerateCoverageForSpecifiedTargets = "NO">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -78,6 +81,7 @@
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "NO"
testExecutionOrdering = "random">
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -88,6 +92,8 @@
</BuildableReference>
</TestableReference>
</Testables>
<CommandLineArguments>
</CommandLineArguments>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -109,6 +115,8 @@
ReferencedContainer = "container:Levain.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand All @@ -126,6 +134,8 @@
ReferencedContainer = "container:Levain.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
</CommandLineArguments>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
8 changes: 8 additions & 0 deletions Levain/App/AppLaunchOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ enum AppLaunchOptions {
/// When present, simulates a cold launch opened from a notification route.
static let keyPendingNotificationRoute = "LEVAIN_PENDING_NOTIFICATION_ROUTE"

/// `"1"` → start without the animated splash so automation can interact
/// with the UI immediately.
static let keySkipSplash = "LEVAIN_SKIP_SPLASH"

// MARK: - Resolved Values

/// Whether the current process was launched with an isolated in-memory store.
Expand Down Expand Up @@ -61,4 +65,8 @@ enum AppLaunchOptions {
static var pendingNotificationRoute: String? {
ProcessInfo.processInfo.environment[keyPendingNotificationRoute]
}

static var shouldSkipSplash: Bool {
ProcessInfo.processInfo.environment[keySkipSplash] == "1"
}
}
30 changes: 26 additions & 4 deletions Levain/App/LevainApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct LevainApp: App {
@StateObject private var router = AppRouter()
@StateObject private var environment = AppEnvironment()

@State private var showSplash = true
@State private var showSplash = !AppLaunchOptions.shouldSkipSplash

let container: ModelContainer

Expand Down Expand Up @@ -36,6 +36,10 @@ struct LevainApp: App {
}
}
.task {
guard showSplash else {
environment.markLaunchTransitionComplete()
return
}
try? await Task.sleep(for: .seconds(1.9))
withAnimation(.easeIn(duration: 0.55)) {
showSplash = false
Expand Down Expand Up @@ -128,7 +132,9 @@ private struct SplashView: View {
private struct SplashLogoAnimationView: View {
let reduceMotion: Bool

@State private var player = SplashLogoAnimationAsset.makePlayer()
// Created once in onAppear: a default-value expression here would run on every
// re-init of this view (the splash re-renders while it animates).
@State private var player: AVPlayer?

var body: some View {
ZStack {
Expand All @@ -145,6 +151,9 @@ private struct SplashLogoAnimationView: View {
}
.accessibilityHidden(true)
.onAppear {
if player == nil {
player = SplashLogoAnimationAsset.makePlayer()
}
guard reduceMotion == false else { return }
player?.seek(to: .zero)
player?.play()
Expand Down Expand Up @@ -209,7 +218,10 @@ private final class PlayerContainerView: UIView {
}

private enum SplashLogoAnimationAsset {
static func makePlayer() -> AVPlayer? {
/// Copies the bundled video to a temporary file once per install and reuses it,
/// so the file is never rewritten while a player is reading it.
@MainActor
private static let fileURL: URL? = {
guard let dataAsset = NSDataAsset(name: "BatchLogoLoading") else {
return nil
}
Expand All @@ -218,13 +230,23 @@ private enum SplashLogoAnimationAsset {
.appendingPathComponent("batch-logo-loading")
.appendingPathExtension("mov")

let existingSize = (try? FileManager.default.attributesOfItem(atPath: url.path))?[.size] as? Int
if existingSize == dataAsset.data.count {
return url
}

do {
try dataAsset.data.write(to: url, options: [.atomic])
return url
} catch {
return nil
}
}()

let player = AVPlayer(url: url)
@MainActor
static func makePlayer() -> AVPlayer? {
guard let fileURL else { return nil }
let player = AVPlayer(url: fileURL)
player.isMuted = true
player.actionAtItemEnd = .pause
return player
Expand Down
111 changes: 111 additions & 0 deletions Levain/DesignSystem/Components/FormFields.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import SwiftUI
import UIKit

/// Labeled text row for forms. The whole row is tappable and moves focus to
/// the field, so the user does not have to aim at the trailing text area.
struct FormTextRow: View {
let title: String
let placeholder: String
@Binding var text: String
var autofocus: Bool = false
var capitalization: TextInputAutocapitalization = .sentences
var keyboard: UIKeyboardType = .default
var fieldAccessibilityIdentifier: String?

@FocusState private var isFocused: Bool

var body: some View {
LabeledContent(title) {
field
}
.contentShape(Rectangle())
.onTapGesture { isFocused = true }
.task {
guard autofocus else { return }
// Wait for the sheet presentation to settle before raising the keyboard.
try? await Task.sleep(for: .milliseconds(450))
isFocused = true
}
}

@ViewBuilder
private var field: some View {
let base = TextField(placeholder, text: $text)
.multilineTextAlignment(.trailing)
.keyboardType(keyboard)
.textInputAutocapitalization(capitalization)
.submitLabel(.done)
.focused($isFocused)

if let fieldAccessibilityIdentifier {
base.accessibilityIdentifier(fieldAccessibilityIdentifier)
} else {
base
}
}
}

/// Labeled numeric row for forms: decimal keypad, whole-row tap target and
/// the current value selected on focus so typing replaces it.
struct NumericField: View {
let title: String
@Binding var value: Double

@FocusState private var isFocused: Bool

var body: some View {
LabeledContent(title) {
TextField("0", value: $value, format: .number)
.keyboardType(.decimalPad)
.multilineTextAlignment(.trailing)
.focused($isFocused)
.onReceive(NotificationCenter.default.publisher(for: UITextField.textDidBeginEditingNotification)) { notification in
guard isFocused, let field = notification.object as? UITextField else { return }
Task { @MainActor in
field.selectAll(nil)
}
}
}
.contentShape(Rectangle())
.onTapGesture { isFocused = true }
}
}

extension View {
/// Adds a "Fine" button above the keyboard (decimal pads have no return key)
/// and lets the user dismiss the keyboard by scrolling the form.
func formKeyboardToolbar() -> some View {
scrollDismissesKeyboard(.interactively)
.toolbar {
ToolbarItemGroup(placement: .keyboard) {
Spacer()
Button("Fine") {
UIApplication.shared.sendAction(
#selector(UIResponder.resignFirstResponder),
to: nil,
from: nil,
for: nil
)
}
.fontWeight(.semibold)
}
}
}

/// Makes the full row (including the empty space created by `Spacer`)
/// respond to taps in plain-styled buttons.
func formRowHitArea() -> some View {
frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
}
}

/// Plain button style whose whole label frame is tappable, including the empty
/// space created by `Spacer`. Use it for full-width rows instead of `.plain`.
struct FullRowPlainButtonStyle: ButtonStyle {
func makeBody(configuration: Configuration) -> some View {
configuration.label
.contentShape(Rectangle())
.opacity(configuration.isPressed ? 0.55 : 1)
}
}
1 change: 1 addition & 0 deletions Levain/Features/Bakes/BakeCreationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ struct BakeCreationView: View {
.lineLimit(3...5)
}
}
.formKeyboardToolbar()
.navigationTitle("Nuovo impasto")
.tint(Theme.Control.primaryFill)
.toolbar {
Expand Down
15 changes: 1 addition & 14 deletions Levain/Features/Bakes/BakesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ struct BakesView: View {
.foregroundStyle(Theme.muted)
}
}
.buttonStyle(.plain)
.buttonStyle(FullRowPlainButtonStyle())
}
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
Expand Down Expand Up @@ -471,19 +471,6 @@ struct FormulaStatRow: View {
}
}

struct NumericField: View {
let title: String
@Binding var value: Double

var body: some View {
LabeledContent(title) {
TextField("", value: $value, format: .number)
.keyboardType(.decimalPad)
.multilineTextAlignment(.trailing)
}
}
}

#Preview("Bakes") {
NavigationStack {
BakesView()
Expand Down
13 changes: 9 additions & 4 deletions Levain/Features/Bakes/FormulaEditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@ struct FormulaEditorView: View {
var body: some View {
Form {
Section("Identità") {
LabeledContent("Nome della ricetta") {
TextField("es. Pane di Segale", text: $name)
.multilineTextAlignment(.trailing)
}
FormTextRow(
title: "Nome della ricetta",
placeholder: "es. Pane di Segale",
text: $name,
autofocus: formula == nil,
capitalization: .words
)
Picker("Tipo", selection: $type) {
ForEach(RecipeCategory.allCases) { option in
Text(option.title).tag(option)
Expand Down Expand Up @@ -150,6 +153,7 @@ struct FormulaEditorView: View {
Image(systemName: "chevron.right")
.foregroundStyle(Theme.muted)
}
.formRowHitArea()
}
.buttonStyle(.plain)
}
Expand Down Expand Up @@ -177,6 +181,7 @@ struct FormulaEditorView: View {
Text("Note")
}
}
.formKeyboardToolbar()
.navigationTitle(formula == nil ? "Nuova ricetta" : "Modifica ricetta")
.tint(Theme.Control.primaryFill)
.toolbar {
Expand Down
2 changes: 1 addition & 1 deletion Levain/Features/Bakes/FormulaListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct FormulaListView: View {
.foregroundStyle(Theme.muted)
}
}
.buttonStyle(.plain)
.buttonStyle(FullRowPlainButtonStyle())
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
.listRowInsets(.levainListRow(top: Theme.Spacing.xs, bottom: Theme.Spacing.xs))
Expand Down
Loading
Loading