feat(tui): route employee feedback follow-ups to internal link (#10198)

## Problem
OpenAI employees were sent to the public GitHub issue flow after
`/feedback`, which is the wrong follow-up path internally.

## Mental model
After feedback upload completes, we render a follow-up link/message.
That link should be audience-aware but must not change the upload
pipeline itself.

## Non-goals
- Changing how feedback is captured or uploaded
- Changing external user behavior

## Tradeoffs
We detect employees via the authenticated account email suffix
(`@openai.com`). If the email is unavailable (e.g., API key auth), we
default to the external behavior.

## Architecture
- Introduce `FeedbackAudience` and thread it from `App` -> `ChatWidget`
-> `FeedbackNoteView`
- Gate internal messaging/links on `FeedbackAudience::OpenAiEmployee`
- Internal follow-up link is now `http://go/codex-feedback-internal`
- External GitHub URL remains byte-for-byte identical

## Observability
No new telemetry; this only changes rendered follow-up instructions.

## Tests
- `just fmt`
- `cargo test -p codex-tui --lib`
This commit is contained in:
Josh McKinney authored and GitHub committed 2026-01-30 02:12:46 +00:00
1 parent a9cf449a80
commit 36f2fe8af9
5 files changed
+154 -33

No files matched your search

+10
View File
@@ -147,6 +147,7 @@ use crate::bottom_pane::CollaborationModeIndicator;
use crate::bottom_pane::DOUBLE_PRESS_QUIT_SHORTCUT_ENABLED;
use crate::bottom_pane::ExperimentalFeatureItem;
use crate::bottom_pane::ExperimentalFeaturesView;
use crate::bottom_pane::FeedbackAudience;
use crate::bottom_pane::InputResult;
use crate::bottom_pane::LocalImageAttachment;
use crate::bottom_pane::QUIT_SHORTCUT_TIMEOUT;
@@ -379,6 +380,7 @@ pub(crate) struct ChatWidgetInit {
pub(crate) models_manager: Arc<ModelsManager>,
pub(crate) feedback: codex_feedback::CodexFeedback,
pub(crate) is_first_run: bool,
pub(crate) feedback_audience: FeedbackAudience,
pub(crate) model: Option<String>,
pub(crate) otel_manager: OtelManager,
}
@@ -558,6 +560,7 @@ pub(crate) struct ChatWidget {
last_rendered_width: std::cell::Cell<Option<usize>>,
// Feedback sink for /feedback
feedback: codex_feedback::CodexFeedback,
feedback_audience: FeedbackAudience,
// Current session rollout path (if known)
current_rollout_path: Option<PathBuf>,
external_editor_state: ExternalEditorState,
@@ -845,6 +848,7 @@ impl ChatWidget {
rollout,
self.app_event_tx.clone(),
include_logs,
self.feedback_audience,
);
self.bottom_pane.show_view(Box::new(view));
self.request_redraw();
@@ -2047,6 +2051,7 @@ impl ChatWidget {
models_manager,
feedback,
is_first_run,
feedback_audience,
model,
otel_manager,
} = common;
@@ -2143,6 +2148,7 @@ impl ChatWidget {
last_separator_elapsed_secs: None,
last_rendered_width: std::cell::Cell::new(None),
feedback,
feedback_audience,
current_rollout_path: None,
external_editor_state: ExternalEditorState::Closed,
};
@@ -2186,6 +2192,7 @@ impl ChatWidget {
models_manager,
feedback,
is_first_run,
feedback_audience,
model,
otel_manager,
} = common;
@@ -2281,6 +2288,7 @@ impl ChatWidget {
last_separator_elapsed_secs: None,
last_rendered_width: std::cell::Cell::new(None),
feedback,
feedback_audience,
current_rollout_path: None,
external_editor_state: ExternalEditorState::Closed,
};
@@ -2312,6 +2320,7 @@ impl ChatWidget {
auth_manager,
models_manager,
feedback,
feedback_audience,
model,
otel_manager,
..
@@ -2408,6 +2417,7 @@ impl ChatWidget {
last_separator_elapsed_secs: None,
last_rendered_width: std::cell::Cell::new(None),
feedback,
feedback_audience,
current_rollout_path: None,
external_editor_state: ExternalEditorState::Closed,
};