mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-07 03:00:29 +00:00
fabro(01KT2C9EGA92BZRZRWW9Y4SYE4): simplify_opus (succeeded)
Fabro-Run: 01KT2C9EGA92BZRZRWW9Y4SYE4
Fabro-Completed: 6
Fabro-Checkpoint: 8743ad52b8
⚒️ Generated with [Fabro](https://fabro.sh)
This commit is contained in:
parent
a5f2a0c9d4
commit
06ef479d60
4 changed files with 31 additions and 13 deletions
|
|
@ -35,8 +35,8 @@ export function RunTableRow({
|
|||
}) {
|
||||
const lifecycleLabel = listLifecycleStatusLabel(run);
|
||||
const statusDisplay = columnStatusDisplay[run.status];
|
||||
const creator = principalDisplay(run.createdBy);
|
||||
const show = (col: ToggleableColumn) => !hiddenColumns.has(col);
|
||||
const creator = show("created_by") ? principalDisplay(run.createdBy) : null;
|
||||
|
||||
return (
|
||||
<tr className={`group relative border-b border-line transition-colors last:border-b-0 ${selected ? "bg-overlay/30" : "hover:bg-overlay/40"}`}>
|
||||
|
|
@ -53,7 +53,7 @@ export function RunTableRow({
|
|||
<span className={`font-mono text-xs ${statusDisplay.text}`}>{run.statusLabel}</span>
|
||||
</span>
|
||||
</td>
|
||||
{show("created_by") && (
|
||||
{creator != null && (
|
||||
<td className="relative z-10 w-8 whitespace-nowrap px-3 py-2.5">
|
||||
<Tooltip label={creator.label}>
|
||||
<span aria-label={`Created by ${creator.label}`}>{creator.glyph}</span>
|
||||
|
|
|
|||
|
|
@ -172,13 +172,29 @@ impl AuthContextSlot {
|
|||
pub(crate) fn log_snapshot(&self) -> RequestAuthLogContext {
|
||||
let context = self.0.lock().expect("auth context lock poisoned");
|
||||
RequestAuthLogContext {
|
||||
principal: context.principal.clone(),
|
||||
principal: context.principal.as_ref().map(principal_for_log),
|
||||
auth_status: context.auth_status,
|
||||
auth_error_code: context.auth_error_code,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// HTTP logging never emits the avatar URL; strip it to avoid an owned String
|
||||
// allocation on every authenticated request.
|
||||
fn principal_for_log(principal: &Principal) -> Principal {
|
||||
if let Principal::User(user) = principal {
|
||||
if user.avatar_url.is_some() {
|
||||
return Principal::User(UserPrincipal {
|
||||
identity: user.identity.clone(),
|
||||
login: user.login.clone(),
|
||||
auth_method: user.auth_method,
|
||||
avatar_url: None,
|
||||
});
|
||||
}
|
||||
}
|
||||
principal.clone()
|
||||
}
|
||||
|
||||
impl<S: Send + Sync> FromRequestParts<S> for RequestAuth {
|
||||
type Rejection = Infallible;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,14 @@ pub fn test_principal() -> Principal {
|
|||
|
||||
#[must_use]
|
||||
pub fn test_run_provenance() -> RunProvenance {
|
||||
test_run_provenance_with(test_principal())
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn test_run_provenance_with(subject: Principal) -> RunProvenance {
|
||||
RunProvenance {
|
||||
server: None,
|
||||
client: None,
|
||||
subject: test_principal(),
|
||||
server: None,
|
||||
client: None,
|
||||
subject,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use fabro_graphviz::graph::Graph as GvGraph;
|
|||
use fabro_interview::AutoApproveInterviewer;
|
||||
use fabro_model::Catalog;
|
||||
use fabro_store::{ArtifactStore, Database, RunProjection};
|
||||
use fabro_types::test_support::test_run_provenance_with;
|
||||
use object_store::local::LocalFileSystem;
|
||||
|
||||
use crate::artifact_upload::ArtifactSink;
|
||||
|
|
@ -175,13 +176,9 @@ async fn initialized(
|
|||
workflow_slug: run_options.workflow_slug.clone(),
|
||||
automation: None,
|
||||
db_prefix: None,
|
||||
provenance: fabro_types::RunProvenance {
|
||||
server: None,
|
||||
client: None,
|
||||
subject: fabro_types::Principal::System {
|
||||
system_kind: fabro_types::SystemActorKind::Engine,
|
||||
},
|
||||
},
|
||||
provenance: test_run_provenance_with(fabro_types::Principal::System {
|
||||
system_kind: fabro_types::SystemActorKind::Engine,
|
||||
}),
|
||||
manifest_blob: None,
|
||||
git: run_options.pre_run_git.clone(),
|
||||
fork_source_ref: run_options.fork_source_ref.clone(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue