Skip to content

OBLS-837 Add discrete picking order list screen#430

Open
jmiranda wants to merge 11 commits into
developfrom
OBLS-837
Open

OBLS-837 Add discrete picking order list screen#430
jmiranda wants to merge 11 commits into
developfrom
OBLS-837

Conversation

@jmiranda

Copy link
Copy Markdown
Member

Summary

Adds a new Discrete Picking entry to the Dashboard that lists all open orders ready for picking across every queue type, with real-time search and queue-type filter chips. Tapping an order seeds the picking session and reuses the existing Pick Location → … → Staging flow, one order at a time. This is the "one order at a time" counterpart to the existing batch Picking flow.

Implements OBLS-837.

Changes

Feature

  • Data layergetPickTasksApi now runs unfiltered (params optional); added getOpenPickTasksApi to fetch all open (PENDING/PICKING) pick tasks across all queue types, plus getOpenPickTasksAction action/saga/watcher.
  • Types — new DiscretePickingOrder view model.
  • HandoffPickingContext.startOrderSession(requisitionId) seeds a single-order session via the existing getPickTasksByRequisitionAction, then navigation continues into the existing Pick Location flow.
  • UI (src/screens/Picking/) — DiscretePickingListScreen, DiscretePickingOrderCard, DiscretePickingCardSkeleton, discretePickingStyles, and discretePickingLib (group-by-requisition, priority sort, real-time filter, chip counts). Reuses BarcodeSearchHeader, ListLoadingSkeleton, EmptyView, emptyStateMessage.
  • Wiring — route in Main.tsx; entry in dashboardData.ts.

CI / preview

  • Enabled the previously-disabled pull_request_target_branch: develop trigger so PRs build an APK and deploy to Appetize for preview.
  • Pointed appetize-deploy at a stable shared preview app via $APPETIZE_PUBLIC_KEY (falls back to creating a new app per build when unset).

Notes / follow-ups

  • The multi-field filter panel (Destination / Queue Type / Assignee / Status) from the ticket's acceptance criteria is intentionally deferred — the mockup annotates it as a future enhancement. This PR ships the list, search, queue chips, sort, and empty state.
  • Backend dependency: the list relies on the pick-tasks endpoint returning all open tasks when deliveryTypeCode/ordersCount are omitted (filtered here to status=PENDING&status=PICKING). Confirm this behavior on the backend.
  • The shared downstream flow currently routes back through PickingPickType/staging on completion; adjusting the return destination for discrete picks is a possible follow-up.

Testing

  • yarn lint clean; app-level tsc clean (remaining tsc errors are pre-existing @react-navigation lib-def parse issues under node_modules, unrelated to this change).
  • Manual: Dashboard → Discrete Picking → list loads open orders sorted by priority; search filters in real time across order #, customer, and product; queue chips filter (All clears); empty state renders; tapping an order lands on Pick Location and completes the existing flow.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 8 commits July 24, 2026 02:50
Add a new "Discrete Picking" Dashboard entry that lists all open orders
ready for picking across every queue type, with real-time search and
queue-type filter chips. Tapping an order seeds the picking session and
reuses the existing Pick Location flow, one order at a time.

- apis/picking: allow getPickTasksApi to run unfiltered; add
  getOpenPickTasksApi for all open (PENDING/PICKING) tasks
- redux: add getOpenPickTasksAction + saga + watcher
- types: add DiscretePickingOrder view model
- PickingContext: add startOrderSession(requisitionId) to seed a
  single-order session via getPickTasksByRequisitionAction
- screens/Picking: add DiscretePickingListScreen, order card, skeleton,
  styles, and grouping/sort/filter helpers
- wire route in Main and add Dashboard entry

The multi-field filter panel (Destination/Queue Type/Assignee/Status) is
intentionally deferred to a follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
Build an APK and deploy it to Appetize for every pull request targeting
develop, so reviewers can preview changes in the browser.

- Enable the pull_request_target_branch: develop trigger (was disabled),
  routing PR builds through the existing android-only workflow
- Point appetize-deploy at a stable shared preview app via APPETIZE_APP_ID
  so the preview URL stays constant across builds (falls back to creating
  a new app per build when the var is unset)

Requires (Bitrise dashboard, one-time): enable Pull Request builds for the
app, and set APPETIZE_APP_ID to a preview app's public key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
The appetize-deploy step's input is public_key, not app_id; the previous
key was ignored, so every build created a new Appetize app. Use
public_key: $APPETIZE_PUBLIC_KEY so builds update one stable preview app.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
Remove the public_key input added earlier. With APPETIZE_PUBLIC_KEY unset
it resolved to empty, and this appetize-deploy version may mishandle an
empty public_key. Match the proven develop config (no public_key input),
which creates a new preview app per build. The stable shared-app key can
be reintroduced once the pipeline is green and a key exists.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
PR builds now deploy to a dedicated PR preview Appetize app instead of
overwriting the main app used by develop. A script selects the target
public key by build type ($BITRISE_PULL_REQUEST distinguishes PR from
push builds) and appetize-deploy uses it. A run_if guard skips the deploy
entirely when no key is configured, so it never falls back to creating a
new app.

Requires two Bitrise env vars: APPETIZE_DEVELOP_PUBLIC_KEY (main app) and
APPETIZE_PR_PUBLIC_KEY (PR preview app).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
Set APPETIZE_DEVELOP_PUBLIC_KEY to the main app used by develop. Leave
APPETIZE_PR_PUBLIC_KEY empty until the PR preview app is created; the
appetize-deploy run_if guard skips the deploy while it is empty, so PR
builds cannot overwrite the main app in the meantime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
The select-app script runs under set -u, so referencing an unset
APPETIZE_*_PUBLIC_KEY aborted the step (as happened before the keys were
defined, and would recur if Bitrise omits an empty-valued env var). Use
${VAR:-} defaults so the script tolerates unset or empty keys; the
run_if guard on appetize-deploy still skips the deploy when the resolved
key is empty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
On PR builds only, append "(Experimental)" to the Android app_name after
branding runs, so the PR preview app is clearly distinguishable from the
stable build in Appetize (which shows the app name from the APK manifest).
Guarded by BITRISE_PULL_REQUEST so stable/develop builds keep the plain
name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
claude added 3 commits July 24, 2026 18:48
Appetize keys apps by applicationId, so a same-package PR APK merged into
the stable app instead of creating a separate one. On PR builds, suffix
the applicationId with .experimental (alongside the app-name tag) so the
PR build uploads as its own Appetize app with its own URL. No package-tied
services (Firebase/Maps/google-services) exist, so the suffix is safe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
Set APPETIZE_PR_PUBLIC_KEY to the PR preview app's key so PR builds now
deploy the experimental APK to their own Appetize app instead of skipping
the deploy. For the v1 API the appetize-deploy step uses, the build id and
public key are interchangeable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
After deploying, POST a note to the Appetize v1 API for the deployed app
with PR number, branch, short commit, and build number, so each preview
is self-documenting in the dashboard. The appetize-deploy step can't set
notes itself. The v1 API has no tags field, so tags stay manual. The call
is non-fatal so a note failure never reds the build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zmhJ6yv58QsHzj8EwAnZb
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.

2 participants