I`m writing a template to learn a little bit more about LaTeX, and I am not satisfied with my \chapter{} command. I tried to make a mini TOC with the chapter number like the figure below:

However, I want some specific changes to make this one perfect to me.
First, I get very uncomfortable with the different spacing on the right and left sides, and I don`t know how fix this, moreover, I want the spacing in all sides to be the same, not like the image below:

Second, I would really like the content inside the mini table of contents to adapt to the size of the rectangle that contains it, so that the more sections within it, the smaller the font will be to fit all the sections.
Third, I get the warning
Overfull \hbox (1.22324pt too wide) in paragraph at lines 15--15when I type the command\chapter{Entering the commands}and I really have no idea why.
Well, my MWE is this:
My .cls file:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{solutionclass}[2023/03/03 My Custom LaTeX Class for exercise solutions]
\LoadClass[a4paper, twoside, 11pt]{book}
% LANGUAGE AND ENCODING
\RequirePackage[portuguese, english]{babel}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
% TEXT FORMATTING AND MANIPULATION
\RequirePackage{csquotes}
\RequirePackage{mathrsfs}
\RequirePackage{titlesec}
\RequirePackage{lipsum}
% FIGURES, TIKZ AND BOXES
\RequirePackage{graphicx}
\RequirePackage{float}
\RequirePackage{xcolor}
\RequirePackage{tikz}
\RequirePackage{tikz-3dplot}
\RequirePackage{pgfplots}
\RequirePackage[most]{tcolorbox}
% PAGE AND TEXT STYLES
\RequirePackage[colorlinks = true,
urlcolor = LinkColor,
anchorcolor = LinkColor,
citecolor = LinkColor,
filecolor = LinkColor,
linkcolor = LinkColor,
menucolor = LinkColor,
linktocpage = true,
bookmarks = true,
pdfusetitle]{hyperref}
\RequirePackage[top = 2.5cm,
bottom = 3.8cm,
left = 2cm,
right = 2cm,
]{geometry}
\RequirePackage{microtype}
\RequirePackage{titletoc}
\RequirePackage{multicol}
\RequirePackage{lmodern}
\RequirePackage{nameref}
\usetikzlibrary{%
decorations.pathreplacing,
decorations.pathmorphing,
decorations.markings,
shapes.multipart,
shapes.geometric,
arrows.meta,
tikzmark,
fadings,
arrows,
angles,
quotes,
calc,
3d,
}
\pgfplotsset{compat=1.18}
% COLOR SETTINGS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{myblack}{HTML}{101010} % PERSONAL BLACK
\definecolor{myorangeI}{HTML}{e93820} % PERSONAL ORANGE I
\definecolor{LinkColor}{HTML}{eb5a00} % PERSONAL ORANGE II
% CHAPTER SETTINGS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\chapterNumberAndMinitoc}{%
\begin{tikzpicture}
\node[%
minimum height = 3.2cm,
text width = 2.5cm,
outer sep = 0pt,
align = center,
fill = myblack,
font = \color{white}\fontsize{80}{90}\selectfont,
] (num) {\thechapter};
\node[%
rotate = 90,
anchor = south,
font = \color{black}\Large\normalfont
] at ([xshift=-3pt] num.west) {\textls[180]{\textsc{List N°}}};
\node[%
minimum height = 3.2cm,% Height of the box
minimum width = 6.2cm,
inner sep = 2.5mm, % The border thickness
align = left, % Text aligning
fill = myblack, % Color background
] at ([xshift=-10.3cm] num.east) {%
\color{white}
\begin{minipage}{0.7552\textwidth} % Control the width of the box
\begin{multicols}{2}
\printcontents[sections]{}{1}{}{}
\end{multicols}
\end{minipage}
};
\end{tikzpicture}%
}
\titleformat{\chapter}[display]
{\normalfont\bfseries\color{myblack}}
{\filleft%
\chapterNumberAndMinitoc}{1em}
{\titlerule[2.5pt]\vspace{3pt}\titlerule\vspace{4pt}\LARGE\textsc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\patchcmd{\chapter}{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
}{%
}{}{}
\makeatother
\let\oldsection\section
\renewcommand{\section}[1]{%
\oldsection*{#1}
\phantomsection
\addcontentsline{toc}{section}{#1}
}
My .tex file:
\documentclass[]{solutionclass}
\pagestyle{plain}
\begin{document}
\makeatletter
\startcontents[sections]
\phantomsection
\chapter{Entering the commands} % Here I have the warning
\makeatother
\section{Unbreakable Form}
\section{Breakable Form}
\section{Using the references}
\section{Equations style}
\section{Additional Boxes}
\section{Additional Commands}
\end{document}
Additional comments:
I remove the number of each section to keep the mini-TOC clean;
If this code doesn't work, it is possible that I have forgotten some information in the post, because as the
.clsis very large, I didn't want to put everything so that it wouldn't be difficult to understand, but for me this code works;
I'm compiling with pdfLaTeX.



