Mrs. X is under investigation for an alleged crime (say, embezzling
from her employer). Prosecutors have obtained a search warrant and
seized her computer. X's attorney files a motion arguing against the
validity of the computer search, and a court date is selected for a
hearing before a judge.
At that hearing, the prosecutor requests that the courtroom be closed
to the public
Search warrants are generally issued ex parte (i.e. without an adversarial hearing) and are routinely kept secret until they have been carried out. Targets of search warrants are often, but hardly always, the subject of criminal investigations. Search warrants can only be issued upon a showing a probable cause to believe that the search will reveal evidence pertinent to a crime that has been committed.
If a search warrant is issued wrongfully, the remedies are a motion to suppress illegally obtained evidence, and/or a civil lawsuit for money damages, after the search has been completed.
Conceivably, a search warrant target could argue that the affidavit providing a basis for the search should continue to be kept under seal, but, unless this was necessary for a grand jury investigation to continue in secrecy, this request would usually be denied.
A subpoena does not require a showing of probable cause to issue and can be contested before documents are turned over pursuant to it by the person to whom it is directed (and sometimes other people as well), but a subpoena is rarely issued to an actual target of a criminal investigation.
A prosecutor can usually maintain secrecy by conducting an investigation through a grand jury which has subpoena power.
Protecting the privacy of a subpoena target would not be a valid reason for closing the courtroom.
But a prosecutor's desire to not tip off other subjects of the grand jury investigation, which a public hearing on quashing a grand jury subpoena might do, would be a basis for a valid request from the prosecutor to close the hearing to the public.
Have any of X's rights been violated?
There is a constitutional right of the public and the press to attend court hearings in most circumstances.
There is no constitutional right to not have your reputation tarnished by criminal prosecutors in the course of a criminal investigation.
Also, generally speaking, prosecutors have absolute immunity from liability for any conduct they commit in the course of a courtroom process.
Did she have any right to not have her name tarnished before enough
evidence was gathered to even charge her with a crime?
Similar arguments were soundly rejected by an appellate court panel, for example, in the classified documents criminal investigation of former President Trump.