11 Commits

Author SHA1 Message Date
Raykov-MS
0bdb83d2f3 Fix event-loop mismatch masking OpenCloud token as "not found" on first click
Each call into opencloud_token_store is wrapped in its own asyncio.run()
(app/app_config.py, main.py's token popover), so every call gets a fresh
event loop. The asyncpg connection pool is bound to the loop it was created
in, so the next asyncio.run() could try to reuse a connection from an
already-closed loop and fail — unrelated to actual DB availability, but the
broad except Exception in resolve_opencloud_access_token() silently
swallowed it and fell through to "token not found", masking the real cause.

- add_token/get_token/remove_token/list_usernames now call engine.dispose()
  in a finally block so each asyncio.run() starts with a clean pool.
- resolve_opencloud_access_token() now surfaces the real exception via
  st.error() before falling back to the .env token (kept only for local dev
  without a DB).
- Added tests/unit/test_opencloud_token_store.py covering that dispose() is
  called after every store operation, including when commit() raises.
2026-09-17 16:56:08 +03:00
Raykov-MS
7b90daa396 Remove SMB entirely, switch input to attached zip, add self-service token popover
- Drop SMB/SAMBA subsystem completely: app/samba_access.py, app/path_settings.py,
  app/path_store.py, app/pipeline/file_manager.py and their tests, plus the
  smbprotocol dependency and all related UI (login/password fields, path editor,
  SMB diagnostics) in main.py.
- run_batch now takes a .zip attached via Streamlit's file_uploader (same as the
  local dev tool) instead of reading from SMB or a fictitious OpenCloud "Attach"
  folder; renamed from run_local_zip_batch since it's now the single canonical
  batch entrypoint used by both main.py and scripts/local_zip_test_app.py.
- Fixed run number resolution: added next_opencloud_run_number() which lists the
  Out/year/month/day folder via WebDAV PROPFIND, so repeated runs land in
  incrementing subfolders instead of always overwriting "1".
- Added a self-service "Добавить токен" popover in main.py so users can link
  their own OpenCloud App Token to their Keycloak account (opencloud_token_store)
  without an admin running the CLI script; reworded the missing-token error to
  point at it.
2026-09-17 15:34:53 +03:00
Raykov-MS
6f69fc48cc Added db 2026-09-17 13:04:35 +03:00
Raykov-MS
79a35edcf4 Raw version migrate smb to openclaude 2026-09-14 17:25:05 +03:00
Raykov-MS
a4379e5513 move to xlsxwriter 2026-07-29 10:28:17 +03:00
Raykov-MS
9cbfbd041f parser 2026-06-22 07:25:27 +03:00
Raykov-MS
04fed17c9d fix requitrements 2026-06-04 17:24:42 +03:00
Raykov-MS
998354293b precommit 2026-06-04 16:45:18 +03:00
Raykov-MS
2d31aa1f66 Правик 2026-06-04 16:27:02 +03:00
Raykov-MS
488b574366 правки 2026-06-04 15:20:29 +03:00
Raykov-MS
a295417287 move to streamlit 2026-06-04 14:13:30 +03:00