Skip to content

Bugfix/remove stdin#903

Closed
alanpoon wants to merge 309 commits into
project-robius:mainfrom
alanpoon:bugfix/remove_stdin
Closed

Bugfix/remove stdin#903
alanpoon wants to merge 309 commits into
project-robius:mainfrom
alanpoon:bugfix/remove_stdin

Conversation

@alanpoon
Copy link
Copy Markdown
Contributor

@alanpoon alanpoon commented Jun 3, 2026

No description provided.

alanpoon and others added 30 commits April 1, 2026 08:22
- propagate target_user_id through RoomInputBar and SendMessage requests\n- route targeted messages/replies via raw payload with org.octos.target_user_id\n- ensure targeted bot is invited into room before targeted send\n- add App Service panel action to view bound bots from bindings plus room members\n- send App Service status/validation feedback as room notice messages instead of popup notifications
- Move location trigger into expandable quick action card
- Show send button only when input has content
- Add persistent more-actions button and themed styling
- Add emoji picker button with preset emojis and inline insertion
- add desktop avatar file picker upload flow in account settings\n- add MatrixRequest::UploadAvatar worker path with PNG/JPEG validation\n- add fallback delete-avatar request for homeservers returning M_UNRECOGNIZED\n- show not-supported notices for avatar actions on mobile platforms
- add English and Simplified Chinese translation resources

- introduce i18n module and wire AppLanguage-driven text updates

- replace hardcoded UI strings in home/login/settings/room/tsp flows
Add a comprehensive, self-contained deployment guide (English + Chinese)
with ready-to-run Docker Compose example configs. Users can go from zero
to a working Robrix → Palpo → Octos → LLM setup in 5 steps.

Includes:
- Step-by-step quick start with setup.sh for repo cloning
- Full configuration reference (palpo.toml, appservice registration,
  botfather.json, compose.yml) with field-level explanations
- Robrix client usage guide (registration, bot interaction, bot management)
- End-to-end verification checklist and troubleshooting tables
- Example configs that work out of the box (only API key needed)
- Registration screenshot
- README link to the deployment guide
…tar-upload-delete

feat(settings): support avatar upload and robust avatar deletion
…tbar-quick-actions

Refine room input bar quick actions and emoji picker UX
…-and-empty-filter-fallback

fix(search): support exact MXID people search and fallback to full list on empty local results
Improve app service bot targeting and in-room action feedback
…374_china2

Support multiple Matrix accounts simultaneous Issue 374
# Conflicts:
#	src/app.rs
#	src/home/room_screen.rs
#	src/home/spaces_bar.rs
#	src/login/login_screen.rs
#	src/room/room_input_bar.rs
#	src/settings/account_settings.rs
- Extract duplicated point-of-no-return blocks into enter_point_of_no_return()
- Fix missed sender.send().unwrap() on MessageEdited path
- Reset display_filter, sort_fn, and drawn_previously on logout
- Drain PENDING_ROOM_UPDATES and PENDING_SPACE_UPDATES in ClearAppState handlers
# Conflicts:
#	src/home/room_screen.rs
alanpoon and others added 28 commits May 19, 2026 10:38
Month 1 - content upload allow drag and drop
…3) (project-robius#145)

* sync: backport upstream low-conflict fixes (batches 1-2)

* sync: backport upstream medium-conflict UI/event-source fixes (batch 3)
- add localized error keys to en.json / zh-CN.json
- tests assert the enum reason instead of fragile error-substring checks
- drop a stray blank line in the account settings DSL
- update spec to describe the AccessTokenCopyError contract
…project-robius#148)

* sync: backport upstream low-conflict fixes (batches 1-2)

* sync: backport upstream medium-conflict UI/event-source fixes (batch 3)

* sync: backport upstream room pill/cache/tooltip fixes (batch 4)

Backport upstream commits: 63f01d9, 22efa4f, c1a78b0, 6027ee2.\n\nIncludes full room_preview_cache integration, @room mention pill support,\nlink preview widget caching, blurhash decode cost reduction, and tooltip\naction handling shift to tooltip widget itself.

* sync: align packaging/icon pipeline with upstream robrix (batch 5)

Backport upstream packaging/icon behavior so Robrix2 uses the same app icon pipeline as Robrix, including makepad bundle env, icon assets, build.rs icon embedding, and packaging directory parity.

* sync: migrate upstream batch (badge/add-room/password-focus/tsp/verification settings)

* sync: migrate upstream app settings batch and zoom/view-mode parity
…#150)

* Fix SSO pre-build noise via persistent skip-flag file
…roject-robius#149)

proxy: unify GUI-saved proxy as the single source of truth for HTTP
…ect-robius#160)

* docs(lifecycle): add design for mobile app lifecycle handling

Specifies how robrix2's app lifecycle should behave across mobile and
desktop: persist state and pause Matrix sync on background, resume sync
on foreground, save state on quit-requested and window-close, and dedup
identical consecutive writes via a serialized-bytes fingerprint.

Documents the supporting work this depends on:
- aligning robrix2's Makepad runtime + cargo-makepad CLI with the
  Robius ecosystem default (makepad/dev), which provides the
  QuitRequested event, request_quit, MAKEPAD_BUNDLE_NAME, and the
  more elaborate Android NDK / iOS build-tool setup
- splitting save_app_state into serialize + bytes-save helpers so the
  in-process fingerprint dedup is possible without disturbing the
  public save_app_state signature or any of its existing call sites

Enumerates the robrix2-local enhancements that the design explicitly
preserves and refuses to regress:
- load_app_state stays Result<AppState>
- should_restore_loaded_app_state's broader restore criteria
- skip_app_state_restore_once / take_skip_app_state_restore_once
  explicit-logout flow
- rs.robius.robrix bundle identifier
- .cargo/config.toml [env] { value, force = true } syntax
- Box-wrapped RestoreAppStateFromPersistentState payload

Plans seven independently buildable commits so the highest-risk piece
(the Makepad runtime alignment) is auditable on its own.

* chore(makepad): align Makepad runtime with the Robius ecosystem

Switches makepad-widgets and makepad-code-editor from the kevinaboos
fork branch to the canonical makepad/dev branch used by the rest of
the Robius ecosystem. This brings in the QuitRequested event,
Cx::request_quit, the MAKEPAD_BUNDLE_NAME env var, and the broader
Android NDK / iOS build-tool surface.

For Android and iOS builds, the matching cargo-makepad CLI install
command is:
    cargo install --force --git https://github.com/makepad/makepad.git --branch dev cargo-makepad

API compat fix: CheckBox::set_active and RadioButton::set_active gained
an `animate: Animate` parameter in makepad/dev. Updated 10 call sites
in robrix2 to pass Animate::No (programmatic state restoration, no
visual transition needed).

* chore(env): set MAKEPAD_BUNDLE_NAME for macOS app menu

Without this, the macOS application menu next to the Apple logo shows
'MakepadStdinLoop' instead of 'Robrix' when launched via cargo run.
Uses the { value, force = true } syntax already established in this
file for bundle/icon overrides.

* feat(persistence): split save_app_state for write dedup

Splits the in-process save path into three layered functions without
changing the public save_app_state signature:

- serialize_app_state(&AppState) -> Result<Vec<u8>>
- save_app_state_bytes(&[u8], &UserId) -> Result<()>
- save_app_state(AppState, OwnedUserId) -> Result<()>  (now a one-line
  delegation; existing call sites unaffected)

Lets the in-process lifecycle handler serialize the app state once,
fingerprint the bytes, and skip the disk write when the bytes match
the previous save. The disk path also gains a create_dir_all so a
fresh user state directory does not fail the first write.

load_app_state's signature is intentionally unchanged.

* feat(sliding_sync): add sync service lifecycle state machine

Introduces a desired/assumed running pair of atomics plus a tokio
lifecycle lock so the Matrix sync service can be reconciled to a
declared lifecycle state without racing the existing direct start/stop
paths.

Public API additions:
- sync_service_desired_running() -> bool
- set_sync_service_desired_running(bool, &'static str)
- stop_sync_service_for_shutdown(Duration) -> Result<(), Elapsed>

Internal:
- apply_sync_service_desired_state(&'static str) reconciliation loop
- initial-sync and account-switch placement sites now route through
  apply_sync_service_desired_state instead of calling start().await
  directly before the Arc lands in SYNC_SERVICE
- sync error restart honors sync_service_desired_running() before
  re-issuing start; uses apply_sync_service_desired_state for restart
- account-switch cleanup and clear_app_state clear ASSUMED_RUNNING

handle_load_app_state is intentionally not modified.

* feat(app): add AppLifecycle and lifecycle event handler

Adds an AppLifecycle struct and an AppStateSaveFingerprint type that
together capture transient lifecycle position (foreground / active /
last save fingerprint / shutdown latch) and let the app dedup
identical consecutive persistence writes.

Replaces the previous inline Event::Shutdown block in handle_event
with a single dispatch call into handle_lifecycle_event, which routes:
- Pause / Background: persist state, mark inactive / send sync stop
- Resume / Foreground: mark active, send sync start
- WindowCloseRequested: persist state if it's the main window
- QuitRequested: persist state
- Shutdown: once-only handle_shutdown — persist, stop sync with 3s
  timeout, then save the TSP wallet under #[cfg(feature = "tsp")]

persist_runtime_state is the single chokepoint for save-now: serialize
once, hash + length + user_id into a fingerprint, compare to the last
saved fingerprint, skip the disk write when identical.

* feat(menu): add macOS WindowMenu with Quit Robrix item

Replaces Makepad's default stock menu (File / Edit / View / ...) with
a minimal Robrix app menu containing just a 'Quit Robrix' item bound
to Cmd+Q. The Quit item dispatches through the runtime's quit-request
path, which surfaces as Event::QuitRequested in handle_lifecycle_event
so the app gets a chance to persist state before exit.

The 'Robrix' menu label next to the Apple logo comes from
MAKEPAD_BUNDLE_NAME (set in .cargo/config.toml in an earlier commit).
The items inside the menu come from this WindowMenu DSL block.

* fix(logout): use request_quit for graceful shutdown on logout error

When the logout modal hits the unrecoverable point-of-no-return path
and the user opts for immediate restart, route the quit through
cx.request_quit(QuitReason::App) instead of cx.quit().

This goes through the lifecycle handler's Event::QuitRequested arm
and gives persist_runtime_state a chance to save before the process
exits, matching the design's intent that every user-initiated quit
goes through the same save-then-exit flow.

* fix(sliding_sync): clear ASSUMED_RUNNING in reset_runtime_state_for_relogin

The relogin reset path direct-calls sync_service.stop() and leaves
SYNC_SERVICE_ASSUMED_RUNNING with whatever value it had before. Under
token-expiry, the session-change handler running this reset can race
ahead of the sync-state subscriber's Error(invalid_token) arm that
would otherwise clear ASSUMED_RUNNING.

If the race fires, ASSUMED_RUNNING stays true while the actual service
is gone. The next login then calls apply_sync_service_desired_state
which reads DESIRED=true / ASSUMED=true, treats them as already
converged, and breaks without starting the new service — leaving the
re-authenticated session with no Matrix sync.

Fix: clear ASSUMED_RUNNING right after stop() in this function, so the
state machine's view of "actually running" stays consistent with the
real world regardless of which task races to the relogin first.

* chore(spec): align mobile lifecycle contract
…t-robius#163)

* sync: migrate attachment download flow and status UI (batch4)

* fix: gate attachment download desktop imports for mobile builds

* fix: move desktop-only attachment imports into desktop paths

* sync: migrate attachment download state buttons and cancel flow

* sync: align encrypted media helper usage with upstream

* sync: backport touch UX and background-task error handling fixes
- room_screen: drop invalid `visible` property on Splash widget (not a View)
- styles: add missing SETTINGS_REGULAR_TEXT_STYLE token (ported from upstream)
…se/v1.0.0-alpha.1

chore: bump version to 1.0.0-alpha.1
…oject-robius#166)

* fix(proxy): inline save errors; align settings card with Language

Closes project-robius#158.
@kevinaboos
Copy link
Copy Markdown
Member

hi Alan, what's this PR for?

@alanpoon alanpoon closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants