Implement a small app with multiple navigation pages, a list, search functionality, state management, and a simple UI using SwiftUI and basic Combine.
Use SwiftUI navigation, a shared observable state object, and Combine to update search results as the query changes. For grading, model the app state with page, query, and items, and expose filtered items after each state update.
def update_app_state(state, action):