GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(modality): getModality() selector — single source of truth (ADR-006 Step 1) by Storypapst · Pull Request #340 · OpenResilienceInitiative/ORISO-Frontend

Conversation

@Storypapst

@Storypapst Storypapst commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Why

A conversation's modality (Live Chat / Agency Counselling / Internal Group / Self-Help) is re-derived from scattered booleans (registrationType, teamSession, repetitive, …) at ~90 call sites — the documented root cause of the recurring "touching the live chat makes other chats go fuzzy" regressions. ADR-006 Step 1 centralises this into one pure selector.

What

Adds getModality(item): Modality + a Modality enum in src/components/session/getModality.ts. It prefers an explicit backend conversationType once that field is populated (ADR-006 target state) and falls back to the verified heuristic while it is rolled out. Additive only — new file + 8 vitest cases (test-first, red → green), tsc --noEmit clean. No call sites migrated yet (the ~90-site sweep is deferred to avoid colliding with #126 / #275).

Acceptance

  • Correct modality for: anonymous → LIVE_CHAT; registered → AGENCY_COUNSELLING; teamSession → INTERNAL_GROUP; group chat + repetitive → SELF_HELP; explicit conversationType wins; empty/unknown → AGENCY_COUNSELLING default.
  • 8/8 vitest green; tsc --noEmit clean.

Affected repos

ORISO-Frontend only.

Refs ADR-006 (conversation_type as persisted modality), Step 1 (frontend read-contract first).

🤖 Built test-first in an isolated worktree off origin/dev.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sentry[bot] reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@Storypapst @claude
feat(modality): add getModality() selector as the single source of tr…
28e0a55
…uth (ADR-006 Step 1)

Introduce a pure getModality(item) selector + Modality enum so the four conversation
modalities (Agency Counselling, Live Chat, Internal Group, Self-Help) are decided in
ONE place instead of being re-derived from scattered booleans at ~90 call sites — the
documented root cause of the recurring 'touching the live chat goes fuzzy' regressions.

Prefers an explicit backend conversationType when present (ADR-006 target) and falls
back to the verified heuristic (chat -> repetitive?SELF_HELP:INTERNAL_GROUP; else
teamSession -> INTERNAL_GROUP; else ANONYMOUS -> LIVE_CHAT; else AGENCY_COUNSELLING)
while the field is rolled out. Additive only: new file + 8 vitest cases; no call sites
migrated yet (the ~90-site sweep is deferred to avoid colliding with #126/#275).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c49deb31-7f2a-41d6-b34c-a9109da44740

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/adr006-getmodality-selector

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Storypapst

Storypapst commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

Cursor PR Review

Profile: thermonuclear, fix mode: safe-fix, budget: 75m
Status: failed
Head: 28e0a55d
Local full log: /Users/frankgerhardt/Documents/Codex/2026-06-24/bitte-nutze-die-in-meinem-browser/work/ai-pr-review/runs/20260630T152519Z/frontend-pr340-28e0a55d-failed.md

STDERR:
ActionRequiredError: You've hit your usage limit You've saved $140 on API model usage this month with Pro. Switch to a different model or set a Spend Limit to continue with this model. Your usage limits will reset when your monthly cycle ends on 7/16/2026.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Shirloin
Shirloin approved these changes Jul 1, 2026
View reviewed changes
@Shirloin
Shirloin merged commit 8b22b1b into dev Jul 1, 2026
5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Shirloin
Shirloin deleted the feature/adr006-getmodality-selector branch July 1, 2026 07:32
@Storypapst
Storypapst restored the feature/adr006-getmodality-selector branch July 1, 2026 09:30
@kiodreambau
kiodreambau deleted the feature/adr006-getmodality-selector branch July 7, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Shirloin Shirloin Shirloin approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Storypapst @Shirloin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.