Skip to content

feat: strikethrough original dest/origin stations when changed - #562

Open
jkap wants to merge 1 commit into
mainfrom
jkap/sidebar-strikethrough
Open

feat: strikethrough original dest/origin stations when changed#562
jkap wants to merge 1 commit into
mainfrom
jkap/sidebar-strikethrough

Conversation

@jkap

@jkap jkap commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Includes DB changes, OCS message handling changes, and UI changes

Asana Task: 🍫 Strikethrough departure/arrival in orbit sidebar when changed

Does not include accurate design since that's dependent on the tailwind and sidebar redesign work.

Screenshot 2026-08-05 at 11 43 43 AM

Checklist

  • Appearance:
    • (x) Light & dark mode
    • (x) Desktop & mobile sizes
  • Browsers:
    • ( ) Chromium
    • (x) Firefox
    • ( ) Safari
  • Privacy:
    • (x) Commits free of internal data
    • (x) PR description free of internal data
    • (x) Logging free of internal data
  • Tests:
    • (x) Has tests
    • ( ) Doesn't need tests
    • ( ) Tests deferred (with justification)
  • Product/Design sign off:
    • ( ) Okayed the plan for the feature (e.g. the design files, or the Asana task)
    • ( ) Reviewed the feature as implemented (e.g. on dev-green, or saw screenshots)
    • ( ) No review needed

Includes DB changes, OCS message handling changes, and UI changes
@jkap
jkap requested a review from a team as a code owner August 5, 2026 16:16
@jkap jkap added the deploy-to-sandbox deploy this PR to sandbox label Aug 5, 2026
Comment on lines +314 to +315
destination_station:
fragment("COALESCE(?, EXCLUDED.destination_station)", trip.destination_station),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question: is setting destination_station on a TSCH DST conflict a no-op? i.e. can this line be left out, or does the set have to cover all columns?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we might be able to get away with leaving it out. let me do some testing.

} = queried
end

test "TSCH_NEW with changed endpoints preserves scheduled stations and records updates" do

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question: Is this test case redundant given that the previous upsert test case also changes the endpoints?

Comment on lines +91 to +96
# Scheduled endpoints from setup are preserved; new values from
# the TSCH_NEW go to the updated columns because they differ.
origin_station: "ORIGIN_STATION",
origin_station_updated: "ORIGIN_STA",
destination_station: "DESTINATION_STATION",
destination_station_updated: "DEST_STA"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thought/suggestion: I'm not 100% sure which way I'd prefer to handle this, but I'm actually thinking that it may make sense for a TSCH_NEW to update the scheduled endpoints and nil out any updated ones? The reasoning is that semantically I think a TSCH_NEW is meant to represent loading a fresh trip into the schedule (either from HASTUS or as a one-off added by the dispatcher). So in theory, we should not generally receive repeat TSCH_NEWs, except for cases of Kinesis replay.

But imagine for some reason that OCS decided to reload the schedule for the current service date after the usual batch of TSCH_NEW messages at 2am. (For example, if by some error the wrong schedule from HASTUS got loaded). I would expect that if a trip UID got reused (very possible) then the new TSCH_NEW would represent the scheduled state without overrides, and it would be incorrect to show strikethrough based on the prior value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy-to-sandbox deploy this PR to sandbox

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants