Skip to content

feat: report on the way with + and confirm arrival in the steward view [MET-A-015] - #293

Merged
NikolajAAU merged 5 commits into
devfrom
263-2-steward-status-in-the-steward-view
Nov 6, 2026
Merged

NikolajAAU merged 5 commits into
devfrom
263-2-steward-status-in-the-steward-view

Conversation

@NikolajAAU

@NikolajAAU NikolajAAU commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Second of two PRs for #263. The steward sets their status from the steward view during an active scenario:

  • Every station under "Påvirkede stationer" shows how many have arrived out of how many are needed (e.g. 0 / 1) and a + button. Pressing + sends a position report and shows the steward as on the way to that station.
  • On the way, a yellow card says "DU ER PÅ VEJ", a dark card shows the station, the status and the coverage, and a slide "GODKEND ANKOMST" confirms arrival.
  • Arrived, a green card says "DU ER ANKOMMET".
  • Picked the wrong station? Pressing + on another station switches to it.
  • With no status, the control says so and points to +.
  • The chosen station is the steward's own station: it turns red on the map and "Opgaver på ..." shows its tasks (Sub-issue of MET-A-010: The steward's own assignment stands out #158).
  • A refused report is shown in Danish. While the app shows the saved offline copy, + is hidden, the slide is locked, the steward is told why and nothing is sent.

Choices:

    • sits in "Påvirkede stationer", as in the sketch shown to the stakeholders.
  • Arrival is confirmed with a slide, not a tap, as agreed at the sprint review, so it is not sent by mistake.
  • Coverage counts only come from the server, so the steward sees the same as the control room.
  • When the steward logs in again, the current status is fetched, so they see the status they had.
  • Words, colours and the symbol come from stewardStatus and the status colours in Theme.tsx (feat: show steward status as word, symbol and colour [MET-A-015] #287). The status card is a .tsx component (criterion 6).
  • Only additions to ScenarioOverview and StewardView. The existing station picker for position reports is left as it is.

Context

#263, sub-issue of MET-A-015 (#15). Stacked on #291, which is stacked on #287.

How was it verified

  • npm run test:unit and all Jest tests pass, including new tests for the status card, + in the station list, the chosen station as the own station, and the steward view going from no status to on the way to arrived, a refused report and the offline copy. typecheck, lint and format:check pass.
  • Manually in Expo Go on the phone against the local server with a seeded scenario, logged in as steward:
    • "Ingen status" with + and coverage on each station
    • + gives "DU ER PÅ VEJ" with the station card and the slide, and the station turns red with its tasks
    • + on another station switches to it
    • Sliding all the way gives "DU ER ANKOMMET", and a short slide springs back
    • Logging out and in again shows the same status and station
    • Offline: "gemt kopi" is shown, + is hidden and the status cannot change
  • Not checked on the A52/A55 emulator or at the largest font size.

Screenshots / Evidence

Cropped to the status area, so no scenario data is shown.

No status

1-ingen-status

On the way

2-paa-vej

Arrived

3-ankommet

Sketch shown to the stakeholders

image

Noticed, not fixed

  • After arriving, the count under "Påvirkede stationer" and on the station card still shows 0 / 1. The count comes from the server, which does not know about arrivals yet, so the phone shows the same as the control room. It updates once the agreed event contract (ARRIVED) and the server change are in.
  • Check out and "Fortryd" (cancel on the way) come in a follow-up PR after the agreed contract change.
  • The steward view now has two ways to pick a station: the station picker for position reports (MET-A-013) and + for status (MET-A-015). Since + also sends a position report, the old picker could be removed later, once the integration team agrees.
  • Task done (TASK_DONE) is not offered yet, since the sketches only cover on the way and arrived.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Tests
  • Documentation
  • Chore

@NikolajAAU
NikolajAAU added this pull request to stack #292 November 3, 2026 23:47
@NikolajAAU
NikolajAAU requested review from a team as code owners November 3, 2026 23:47
@NikolajAAU NikolajAAU self-assigned this Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Discord notification tracking (managed by GitHub Actions).

@github-actions github-actions Bot added frontend tests pr size: m 201–650 lines diff labels Nov 3, 2026
@NikolajAAU NikolajAAU linked an issue Nov 3, 2026 that may be closed by this pull request
6 tasks
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Code coverage

File Line coverage ✅
Changed files combined 94.78% (109/115) ✅
mobile/src/components/StewardStatusControl.tsx 100% ✅
mobile/src/data/steward-status.ts 100% ✅
mobile/src/screens/ScenarioOverview.tsx 96.15% ✅
mobile/src/screens/StewardView.tsx 92.42% ✅

The combined line coverage of changed application files must reach 80%.

Overall application line coverage Coverage Result
Tested merge 91.78% (2837/3091) ✅

Overall application line coverage must reach 80%.

@Anders-Fiedler Anders-Fiedler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks very good, couldn't find any issues with your code, the only thing is I believe you touch some of the same components in scenarioOverview, so I think a quick merge dev into your branch before merging this into dev would make our lives easier, just to ensure conflicts are resolved before merge not during, good work

@NikolajAAU NikolajAAU changed the title feat: report on the way with + and confirm arrival in the steward vie… feat: report on the way with + and confirm arrival in the steward view Nov 5, 2026
@NikolajAAU
NikolajAAU force-pushed the 263-2-steward-status-in-the-steward-view branch from 46748b1 to b0cfd71 Compare November 5, 2026 14:13
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Test results

Test suite Tests ✅ Passed ❌ Failed Skipped Result
Unit 148 148 0 0 ✅
Integration 118 118 0 0 ✅
Jest 158 158 0 0 ✅
Total 424 424 0 0 ✅

View workflow run · Tested commit: b50c097

@NikolajAAU
NikolajAAU force-pushed the 263-2-steward-status-in-the-steward-view branch from b0cfd71 to a399b2c Compare November 5, 2026 14:30
@github-actions github-actions Bot added pr size: l 651–1000 lines diff and removed pr size: m 201–650 lines diff labels Nov 5, 2026
@NikolajAAU

Copy link
Copy Markdown
Contributor Author

looks very good, couldn't find any issues with your code, the only thing is I believe you touch some of the same components in scenarioOverview, so I think a quick merge dev into your branch before merging this into dev would make our lives easier, just to ensure conflicts are resolved before merge not during, good work

Thanks for the review. I checked by test-merging current dev into the branch, and there are no conflicts. Dev hasn’t changed ScenarioOverview since the branch was made. This PR is stacked, so it merges into the #291 branch rather than dev. When #287 and #291 are merged, it will point at dev, and I’ll rebase it onto dev then, so any conflicts get resolved before the merge and not during it

@MKeinicke
MKeinicke force-pushed the 263-2-steward-status-in-the-steward-view branch from cb5d644 to a370b3b Compare November 5, 2026 17:57

@Seefagut Seefagut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Det eneste: noget af din styling findes der allerede noget til i Theme.tsx (fx afrundede hjørner, skriftstørrelser og spacing). Er det et bevidst valg for at få et bestemt look? Ikke en blokerende kommentar, så approved

@Anders-Fiedler Anders-Fiedler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since there are no conflicts ill approve :)

@NikolajAAU NikolajAAU changed the title feat: report on the way with + and confirm arrival in the steward view feat: report on the way with + and confirm arrival in the steward view [MET-A-015] Nov 6, 2026
@NikolajAAU

Copy link
Copy Markdown
Contributor Author

Det eneste: noget af din styling findes der allerede noget til i Theme.tsx (fx afrundede hjørner, skriftstørrelser og spacing). Er det et bevidst valg for at få et bestemt look? Ikke en blokerende kommentar, så approved

Godt fanget, og nej, kun delvist. Den store statustekst og de ekstra afrundede kort er bevidste, fordi de følger skitsen, vi viste stakeholderne

@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@NikolajAAU
NikolajAAU enabled stacked auto-merge November 6, 2026 12:46
@NikolajAAU
NikolajAAU added this pull request to the merge queue Nov 6, 2026
Merged via the queue into dev with commit 44357c8 Nov 6, 2026
16 checks passed
Base automatically changed from 263-sub-issue-of-met-a-015-steward-updates-their-status-in-the-app to dev November 6, 2026 13:06
@NikolajAAU
NikolajAAU deleted the 263-2-steward-status-in-the-steward-view branch November 6, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend pr size: l 651–1000 lines diff tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sub-issue of MET-A-015: Steward updates their status in the app

3 participants