Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ final class InspectorController extends ChangeNotifier {
/// The capability names the server advertised.
Set<String> get capabilities => session.capabilities;

/// The server's usage instructions, when it supplies them.
String? get instructions => session.instructions;

/// Why the session failed, when it did.
String? get errorMessage => _errorMessage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ final class LiveMcpSession implements McpSession {
@override
String? get protocolVersion => _client?.getProtocolVersion();

@override
String? get instructions => _client?.getInstructions();

@override
Set<String> get capabilities {
final advertised = _client?.getServerCapabilities();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,6 @@ abstract interface class McpSession {
/// The capability names the server advertised, such as `tools`.
Set<String> get capabilities;

/// The server's usage instructions, when it supplies them.
String? get instructions;

/// Every JSON-RPC message this session carries.
Stream<ProtocolEntry> get protocol;

Expand Down
3 changes: 0 additions & 3 deletions packages/noir/tool/mcp_inspector/test/fake_mcp_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ final class FakeMcpSession implements McpSession {
@override
String? get protocolVersion => _connected ? '2026-07-28' : null;

@override
String? get instructions => _connected ? 'Fake instructions.' : null;

@override
Set<String> get capabilities =>
_connected ? const <String>{'tools', 'resources', 'prompts'} : const {};
Expand Down
10 changes: 2 additions & 8 deletions packages/noir/tool/patch_manager/display_models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ enum PatchLayoutMode {
bool get isMedium => this == PatchLayoutMode.medium;
}

enum PatchActionKind { skip, stage, refresh, staged }
enum PatchActionKind { skip, stage, staged }

class PatchActionItem {
const PatchActionItem({
Expand Down Expand Up @@ -105,7 +105,7 @@ class PatchActionSet {
color: PatchTheme.cyan,
),
const PatchActionItem(
kind: PatchActionKind.refresh,
kind: PatchActionKind.staged,
label: 'failed',
selected: true,
enabled: false,
Expand Down Expand Up @@ -258,10 +258,6 @@ class PatchFileRowModel {
additionCount = null;
deletionCount = null;
fallbackMetadata = compact ? 'binary' : 'binary file';
} else if (!file.canStageContent && !file.canStageWholeFile) {
additionCount = null;
deletionCount = null;
fallbackMetadata = compact ? 'preview' : 'preview only';
} else {
additionCount = file.additionCount;
deletionCount = file.deletionCount;
Expand All @@ -283,8 +279,6 @@ class PatchFileRowModel {
/// Short basename of the file, already truncated to fit the current layout.
final String basename;

/// Single-letter file-status glyph (M/A/D/R/B/!/U/S/K) — derived from both
/// the diff status and the review status.
final String fileStatusLetter;

/// One-cell file-kind glyph shown before the basename.
Expand Down
12 changes: 1 addition & 11 deletions packages/noir/tool/patch_manager/patch_manager_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'dart:math' as math;
import 'package:meta/meta.dart';
import 'package:noir/noir.dart'
hide DiffFile, DiffHunk, DiffLine, UnifiedDiffParser;
import 'package:noir/noir.dart' as noir_diff;
import 'package:noir/noir_low_level.dart';
import 'display_models.dart';
import 'git_path.dart';
Expand Down Expand Up @@ -171,7 +170,6 @@ class _PatchManagerViewState extends State<PatchManagerView> {
final _diffFocus = FocusNode();
late final List<FocusNode> _focusRing;
late ScrollController _diffScroll;
final _diffViewController = noir_diff.DiffViewController();
String? _diffScrollTarget;
int _diffAnchorGeneration = 0;
late String _status;
Expand Down Expand Up @@ -223,7 +221,6 @@ class _PatchManagerViewState extends State<PatchManagerView> {
..dispose();
}
_diffScroll.dispose();
_diffViewController.dispose();
super.dispose();
}

Expand Down Expand Up @@ -336,12 +333,7 @@ class _PatchManagerViewState extends State<PatchManagerView> {
!_controller.hasFiles) {
return;
}
final file = _controller.currentFile;
if (file.canStageContent) {
_diffViewController.jumpToHunk(_controller.selectedHunkIndex);
// Patch Manager rows are variable-height cards. DiffView establishes
// the semantic hunk anchor; this correction retains the selected
// line/card offset used by the review workflow.
if (_controller.currentFile.canStageContent) {
_diffScroll.jumpTo(_selectedSectionScrollOffset().toDouble());
}
}),
Expand Down Expand Up @@ -679,13 +671,11 @@ class _PatchManagerViewState extends State<PatchManagerView> {
controller: _controller,
focusNode: _diffFocus,
scrollController: _diffScroll,
diffViewController: _diffViewController,
stagingEnabled: !_refreshRequired,
onSkipHunk: _skipHunk,
onStageHunk: _stageHunk,
onSkipWholeFile: (_) => _skipCurrentReviewTarget(),
onStageWholeFile: _stageWholeFile,
onRefresh: _refresh,
),
),
),
Expand Down
Loading
Loading